Harmonic Oscillator
|
1. System Definition
|
|
The model of a harmonic oscillator corresponds to a second order system with as the input and as the output. The system is defined by the angular frequency , the attenuation , and the gain .s
Parameters
|
Variables
|
Attenuation
|
Input
|
Angular frequency
|
Output
|
Gain
|
|
|
|
The system is defined with the following differential equation
| (1) |
The transfer function that results from this differential equation can be obtained using the DynamicSystems[TransferFunction] command.
| (2) |
The step response for the corresponding system can be observed by changing the slider values for θ and ω in the following application.
In this example, controls the damping, such that a system with results in a system that is under damped and results in an overshoot. For the cases with the system is over damped and the response has no overshoot. If the system is critically damped, resulting in the fastest rise time of the system without overshooting the final value. The parameter is the natural frequency of the system.
The amplitude is set to 1 for this example.
Step Response Plot Routine
Uncontrolled Step Response
|
set value
|
set value
|
|
|
|
|
|
|
|
2. Design of a P controller
|
|
| (3) |
| (4) |
| (5) |
| (6) |
The response to the system to chaging proportional gain controller can be seen below. It is important to note that the P controller is not able to get the system to actually reach the desired final value. The controller has an offset error.
|
|
3. Design of a PI controller
|
|
| (7) |
| (8) |
| (9) |
| (10) |
The effects of adjusting the proportional controller gain and integral controller gain values is displayed below. In most cases, the offset error can be eliminated by adding an integral component to the proportional controller.
It is important to note, that a system may become unstable and begin to oscillate out of control if the value of is too small and the value of to large.
|
|
4. Design of a PID controller
|
|
| (11) |
| (12) |
| (13) |
| (14) |
The system response to changes in the proportional, integral and derivative gains are shown below.
| (15) |
| (16) |
|
|
Download Help Document
Was this information helpful?