-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calibration #66
Comments
Design meeting 2/29/24 with @arouinfar @kathy-phet @ariel-phet @Nancy-Salpepi @pixelzoom Consensus was that the separate calibration of light bulb, etc. would be nice to have, so I should investigate. |
Existing calibration parameters to consider adjusting:
|
@arouinfar and I discovered that it's useful for the light bulb to have a different |
On hold until #156 and related issues are closed. |
The fudge factor added in #166 (comment) changes the flux of the pickup coil for screens that have an electromagnet. They require recalibration of maxEMF. |
As of 11:00AM this morning... Issues with the new flux model have been resolved, so work on calibration can resume. |
Calibration went relatively quickly. Transformer screen needed some tweaks in the above commits, but otherwise things look pretty good. @arouinfar please review. ... and definitely take your time on this review. It's something we can tweak after a dev test, and does not block dev testing. |
@arouinfar To facilitate fiddling with calibration, I've made 2 improvements to the developer features that are available when running with First, in the 'Developer' accordion box, the arrow buttons for the 'Max EMF' control (shown below) now increment/decrement by 100 -- instead of 1, which was not very useful for the range [100000, 6000000]. Second, I've added a 'Max EMF' display to the 'Pickup Coil Debugger' panel, shown below. This is a nicer alternative to the |
With the improvements noted in #66 (comment), the Here is the latest documentation that describes how to calibrate // DEBUG: Writeable via developer controls only, when running with &dev query parameter. Dividing the coil's EMF by
// this number will give us the coil's normalized current (see Coil.normalizedCurrentProperty), which determines the
// responsiveness of view components.
//
// To set this value, follow these steps:
// * Run with &dev query parameter to see the 'Developer' accordion boxes. For screens that have a pickup coil:
// * Check the 'Debugger Panel' checkbox to see the 'Pickup Coil Debugger' panel, which displays 'Max EMF'.
// * Set the sim to settings that will generate the most EMF. Note the value of 'Max EMF' in the 'Pickup Coil Debugger' panel.
// * Set the 'Max EMF' control in the 'Developer' accordion box based on the value that you observe in the 'Pick Coil Debugger' panel.
// Depending on the screen, you may decide to use a smaller value for 'typical' use versus 'extreme' use.
public readonly maxEMFProperty: NumberProperty;
// DEBUG: Writeable via developer controls only, when running with &dev query parameter.
// This is a scaling factor used to smooth out abrupt changes that occur when the magnet transitions between being
// inside & outside the coil. This is used to scale the B-field for sample points inside the magnet, eliminating
// abrupt transitions at the left and right edges of the magnet. For any sample point inside the magnet, the B-field
// sample is multiplied by this value.
//
// To set this value, follow these steps:
// * Run with &dev query parameter to see the 'Developer' accordion boxes. For screens that have a pickup coil:
// * Check the 'Debugger Panel' checkbox to see the 'Pickup Coil Debugger' panel.
// * Move the magnet horizontally through the coil until, by moving it one pixel, you see an abrupt change in the
// displayed flux value.
// * Note the 2 flux values when the abrupt change occurs.
// * Move the magnet so that the largest of the 2 flux values is displayed.
// * Adjust the 'Transition Smoothing Scale' control until the larger value is reduced to approximately
// the same value as the smaller value.
public readonly transitionSmoothingScaleProperty: NumberProperty; |
@pixelzoom thanks for setting up the dev controls, it made calibration much smoother. The one sticking point was that the Max EMF readout in the debugger panel doesn't reset with ResetAll, I had to refresh the browser window. Let's use these values:
The only significant change is the Transformer screen, which was at Max EMF = 5,000,000. A stationary AC source inside of the coils has a max EMF of ~1,600,000 (max amplitude, max frequency, max loops, min loop area) and I found the voltmeter particularly hard to read. Under the same conditions, the DC source has a Max EMF of ~3,100,000 with alt input, but can get much higher when dragged rapidly. Decreasing the Max EMF to 3,500,000 seemed like a good compromise to improve the static AC source case without sacrificing too much from the DC case. |
Back to @arouinfar for review and some questions. I've made the max EMF changes requested in #66 (comment). Any changes for transitionSmoothingScaleProperty? Regarding:
Developer controls are currently NOT reset on ResetAll, and I'd like to keep that consistent. So rather than resetting the max EMF display on ResetAll, I'm now resetting it whenever the "Max EMF" control is changed in the Developer accordion box. Does this address the inconvenience? |
Re #66 (comment), @arouinfar and I reviewed 2 of my questions during today's standup meeting:
No. Current values looked good.
Yes. So all that remains is to review the changes requested for max EMF values. |
Thanks @pixelzoom! Looks good on main, closing. |
This issue concerns the calibration sim model, including the pickup coil, speed of electrons, light bulb, and voltmeter.
PickupCoil has this method, ported from the Java version, and enabled via
?calibrateEMF
:A few issues related to calibration:
LightBulb and Voltmeter likely need to be calibrated separately, and this does not support that.emfProperty
, they observecurrentAmplitudeProperty
(as they should).?calibrateMaxEMF
, I rarely seecurrentAmplitudeProperty
approaching the maximums of its range [-1,1].currentAmplitudeProperty
in PickupCoil updateEMF (the only place it's set), we might want to make itnew DerivedProperty( [ emfProperty ], ... )
.The text was updated successfully, but these errors were encountered: