Particularly, the Distinction block computes the motor's modification in position (in counts) and the very first Gain block divides by the sample time. Subsequent Gain blocks convert the systems from counts/sec to revolutions/sec, and after that from revolutions/sec to revolutions/min. The constant representing the gear ratio requires to be specified in the MATLAB work space before the design can be run.
Reducing the length of the simulation then running the model produces the list below output for motor speed in RPM. Analyzing the above, we can see that the estimate for motor speed is quite loud. This arises for a number of factors: the speed of the motor is actually differing, encoder counts are being occasionally missed, the timing at which the board is surveyed does not precisely match the prescribed sampling time, and there is quantization associated with reading the encoder.
Consider the following design with a simple first-order filter contributed to the motor speed price quote. This design can be downloaded here. Running this model with the sample time increased to 0. 05 seconds and a filter time continuous of 0. 15 seconds produces the list below time trace for the motor speed.
05; filter_constant = 0. 15;. By increasing the tasting duration and adding the filter, the speed price quote undoubtedly is much less noisy. This is particularly handy for enhancing the estimate of the motor's speed when it is running at a stable speed. A drawback of the filtering, nevertheless, is that it adds delay.
In essence we have lost info about the motor's actual reaction. In this case, this makes determining a model for the motor more difficult. When it comes to feedback control, this lag can degrade the efficiency of the closed-loop system. Reducing the time continuous of the filter will minimize this lag, but the tradeoff is that the sound won't be filtered as well.
Thinking about that our input is a 6-Volt step, the observed response appears to have the kind of a first-order step action. Looking at the filtered speed, the DC gain for the system is then approximately 170 RPM/ 6 Volts 28 RPM/V. In order to estimate the time continuous, however, we need lower the filtering in order to better see the true speed of the motor.
01 seconds, we get the following speed reaction. Recalling that a time consistent specifies the time it takes a procedure to achieve 63. 2% of its total modification, we can estimate the time continuous from the above graph. We will try to "eye-ball" a fitted line to the motor's action chart.
Presuming the very same steady-state efficiency observed in the more heavily filtered data, we can estimate the time constant based on the time it takes the motor speed to reach RPM. Because this appears to occur at 1. 06 seconds and the input appears to step at 1. 02 seconds, we can estimate the motor's time continuous to be approximately 0.
For that reason, our blackbox model for the motor is the following. (2) Recalling the model of the motor we derived from very first concepts, duplicated below. We can see that we expected a second-order model, however the response looks more like a first-order model. The explanation is that the motor is overdamped (poles are real) which among the poles controls the action.
( 3) In addition to the reality that our model is reduced-order, the design is a further approximation of the real life in that it disregards nonlinear aspects of the real physical motor. Based upon our direct design, the motor's output must scale with inputs of different magnitudes. For example, the response of the motor to a 6-Volt action must have the same shape as its response to a 1-V action, just scaled by an aspect of 6.
This is due to the stiction in the motor. If the motor torque isn't large enough, the motor can not "break complimentary" of the stiction. מנוע בראשלס. This nonlinear habits is not recorded in our model. Typically, we utilize a viscous friction model that is linearly proportional to speed, instead of a Coulomb friction model that captures this stiction.
You could then compare the predictive capability of the physics-based model to the blackbox design. Another exercise would be to create a blackbox model for the motor based upon its frequency reaction, comparable to what was done with the boost converter in Activity 5b. A benefit of utilizing a frequency response technique to identification is that it enables identification of the non-dominant characteristics.
In Part (b) of this activity, we create a PI controller for the motor.