Wednesday, May 27, 2020

Profile Transposer


The temperatures recorded and logged in profiles during roasts depend on the exact probe placement among other things like airflow. This makes it hard to compare profiles recorded on different machines. Luckily there are some points in a roast that can be identified based on physical changes of the beans during a roast, like the yellow point (DRY) and the start of first-crack (FCs). The recorded temperatures at those points can be compared and used to construct a mapping from profiles recorded on one machine to those on another machine. The profile transposer is a tool that supports the construction and application of such mappings along the temperature axis, but also along the time axis to extend or compress a profile.

Setting the Scene


The profile transposer (menu Tools >> Transposer) allows to transpose the current loaded profile (source) along the x-axis (time) and y-axis (temperature). In both cases, the mapping between the source and the resulting target profile is constructed from a set of value pairs. Each such pair holds a source value taken from the currently loaded profile and its intended target value as entered into the profile transposer dialog. Value pairs are taken from the key points in the roast, which are CHARGE, DRY END (yellow point), FC START (first-crack start), SC START (second-crack start) and DROP.





The profile transposer dialog is split into 3 main sections, each holding a table with source values taken from the loaded profile and fields to enter the corresponding target values.

  • Phases: specification of time mappings by phases target time or percentage values
  • Time: specification of time mappings by target event times
  • BT: specification of bean temperature mappings by target bean temperatures

The first two sections allow to specify target times for the construction of the time mapping (only one table can be used at a time to input time targets) and the last section allows to specify target temperatures for the construction of the temperature mapping.

Note: only a mapping for the bean temperature curve can be constructed and be applied.

A click on a target row header on any of the tables clears all its target values. A click on a column header in a table either clears the corresponding target value or, if a background profile is loaded, fills the target field with the corresponding value from the background profile.

The mechanism to be used for the computation of the mappings can be selected in the popup on top of the dialog (see the Mappings section below for details). The current mapping computed using this mapping and the given source/target pairs for the given points is given in the result row of each table.

The "Apply" button applies the computed mapping to the current profile for verification without having to close the dialog. The "Reset" button reverts the profile to the original one. Leaving the dialog using the "Cancel" button reverts also to the original profile and leaving the dialog instead using the "OK" button creates a new profile by applying the mapping to the loaded profile.


Time Transposition


Transposing a profile along the time axis allows for example to generate a new roast template by extending your last profile by 30 seconds. Let's assume the following profile is loaded.





To extend this profile by 30 seconds we put 13:30 as DROP target of the time table as the loaded profiles DROP time is 13:00.





Here is the result of applying this uniform transformation to the profile given above. The original profile is loaded into the background here.




In this example we specified only the source/target pair for DROP (eg. 13:00/13:30). However, for time transformations there is always a second pair implicitly specified which is the source/target pair for CHARGE, which is always set to 00:00/00:00.

Note that in this example it is not possible to enter a target time for the start of second crack (SC START) as this event is not set in the loaded profile. The effect on the phases times/percentages is displayed in the phases table result row. All phases get slightly extended by the computed transformation. In the time tables result row we see the adjusted times for the other events, DRY END and FC START, which are moved accordingly, as the whole profile gets stretched.



In case you want to avoid that the first two phases and the DRY END and FC START point move along, you can specify additional targets to fix those time points to their current times. Below a target time for the FC START event was added fixing it to the time set already by the profile. Note that this is enough in this case to also keep the DRY END point at the time specified in the loaded profile. Note that it in general depends on the selected mapping and on the given target times how times are mapped as explained in the Section on mappings below.









Setting a phases target (duration or percentage) implicitly sets the target times of all available events to either the profile time or the times resulting from the specified durations. Thus phases targets are only guaranteed to be satisfied using a discrete mapping (see discussion below). 


Temperature Transposition


On my Hottop which I use sometimes to roast smaller samples, the bean temperature reported at FCs is considerably lower than on my Probat (177C vs 197C) while the temperature at DRY is about the same (145C vs 148C) for the same bean. To transfer such profiles at least partially to my larger machine I can apply a temperature transformation to align those to points. Here is the original profile recorded on my Hottop and the corresponding temperature transposition table.




Here a linear mapping is constructed (see below) that is able to map the two given source/target reference pairs exactly and maps the temperatures of the remaining events, CHARGE and DROP accordingly. Note that in the case of temperature mappings, only the source/target pairs specified in the table are considered (in contrast to the time mappings where additional a point for CHARGE 00:00/00:00 is added (see above). 

Below the bean temperature table the computed mapping formula is displayed as 1.1.975*x - 15.2528. This formula can be directly copied as symbolic formula into the BT Y(x) field in the Symb ET/BT tab of the Device  Assignment dialog (menu Config >> Device...) and used while roasting with the source machine (Hottop) to produce the readings mapped to the target machine (Probat).




The effect of applying this linear mapping to the original Hottop profile shows that the temperature compensation that needs to be added to the source temperatures is at the beginning lower than towards the the end of the roast. 





A mapping based on just one source/target pair, as it is calculated if just the FCs target temperature is given, leads to a simple offset (here 19.7C) applied to the whole profile. 









Mappings


The profile transposer offers 3 different type of mappings to compute the transformation function to be applied from the given source/target.
  • discrete: discrete function, stepwise defined between given source/target pairs and extend with the first, respectively last, function at the ends
  • linear: continuous of the form a*x + b with factor a and offset b
  • quadratic: continuous function of the form a*x^2 + b*x + c with factors a and b and offset c
While it is for example always possible to find a perfect linear transformation mapping between two source/target pairs, one has to be aware that it is not always possible to compute a transformation function that is able to satisfy all given targets. For example, see the two points P1 and P2 in the following graphs. Both points can be perfectly fit on a line (a linear function). Note that the following graphics have been produced using the open-source app for the Tonino colormeter.



But adding another point P3 one sees that the best fit (here as red line) might not fulfil any of the source/target pairs in general.



Instead a quadratic mapping satisfying all three source/target pairs, but this one might map values to unintended high or low target values at some parts of the scale.




So in some cases the specified targets can not be fulfilled precisely by a linear or quadratic mapping.

The stepwise discrete mapping applies linear mappings between the targets event and the subsequent target if any, with the first and last mappings extended towards the ends. Therefore a discrete mapping always satisfies the targets exactly, but might lead to unintended results due to its continuous nature. For example the following discrete time mapping works as specified by the targets, but leads to a "crash" in the RoR graph caused by the extremely non-continuous mapping.





Have fun!
Marko



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.