Message ID: 2571
Entry time: Tue Sep 29 02:02:54 2020
In reply to: 2530
Reply to this: 2572

Author:

Ian MacMillan

Type:

Computing

Category:

Simulation

Subject:

Moderinger Simulation

Working with Aaron's suggestions (In the previous post) we got the mode ringer to converge. Previously the loop would continue to excite the sample to infinity but by fixing the following things we were able to get the step function to converge.

Added a discrete zero-pole transfer function after the 100 gain

Included the RMS block

Disabled zero-crossing detection in the saturation

Fixed the sign of the s^2 in the bottom of the plant TF (the i^2 included in s cancels the negative)

The step function represents the excitation of the sample. Ideally, it would excite to the setpoint and stay there but for some reason, it is jumping way past the point before returning. By messing with the gain and the frequency of the low pass filter I could get a variety of results the best is shown below at 50 gain and 40 rad/s.

The power spectrum shown is taken from the spectrum analyzer shown in the loop. It shows what I would expect with a peak around our mode frequency of 1038 Hz.

Next Steps:

Figure out how to run the model entirely from a script. (I got this partially working but it is not fully functional)

Fix the step function it still seems to be wild and we NEED to fix that before making meaningful progress on this project.

Add some sort of error estimation: quantify how good this loop is at measuring what we want.

How can we optimize our loop parameters to minimize this error?