sketching bode plots by hand
TRANSCRIPT
1
Sketching Bode Plots by Hand
MECH 3140Lecture #
Recall what a bode plot is
β’ It is the particular solution to a LTI differential equation for a sinusoidal input
β’ It shows how the output of a system will responds to different input frequencies (including constant inputs, i.e. Ο=0)
β’ It is plotted as gain and phase where gain is the ππππππππππππ
ππππππππππand phase is the phase
difference between the input sinusoid and output sinusoid
2
Why know how to sketch?
β’ Matlab can plot a bode plot and calculate the gain and phase from any transfer function
β’ So why do we need to know how to sketch (approximately draw) one?β Its not to be a painβ Its not because we donβt like matlab
β’ By understanding how to sketch a bode plot we can do two things as systems engineer where we might not have the transfer function to begin withβ Design
β’ If I am designing a system I donβt have a transfer function to put into matlab β I am building the transfer function
β’ By understanding how to sketch a bode plot, I understand how to make a system with a given response
β Analysisβ’ I might just be given data to look at and need to understand what the system might
be (i.e. be able to back out the transfer function from frequency response)β’ I might be analyzing a specific phenomena and by understanding how to sketch a
bode plot I can understand what is happening or how to fix/change the phenomena.3
Bode Sketching Rules
β’ You will notice that these sketching rules essentially come from the gain and phase calculationsβ The rules for 1st and 2nd order systems are βextendedβ by
understanding how gains multiply and phases add.β From these relationships you will notice that the rule for a
pole is inverted (or flipped) for the rule from a zeroβ’ Gain and phase of the numerator vs. denominator
πΊπΊ ππ = π»π»(ππππ) =ππππππ(ππππ)ππππππ(ππππ)
=ππ(ππππ)ππ(ππππ)
ππ ππππππ ππππ
4
β ππ = β π»π» ππππ = β ππππππ ππππ β β ππππππ ππππ = β ππ ππππ β β ππ ππππ + β ππ ππππ β β ππ ππππ
Bode Sketching Rules
β’ Draw your vertical and horizontal axisβ Label horizontal axis Ο (rad/s)β Label the top vertical axis Gainβ Label the bottom vertical axis Phase (or Ο)
β’ Mark the magnitude of all zeros and poles on the frequency axisβ It is sometimes helpful to draw the poles and zeros
on the s-plane (or at least calculate their magnitudes and damping ratios if they are under-damped)
5
Bode Sketching Rules (Gain)β’ Start by sketching the asymptotes:
β Start from the DC Gainβ’ If the DC gain is 0 or β then start with a line of correct
slope (depending on the number of zeros or poles at the origin)
β Move in frequency until you hit the frequency (in magnitude) of a pole or zero
β’ This is the absolute value of the pole or zero if it is realβ’ This is the Οn of the pole or zero if it is complex
β The slope then changes +1 for every zero and -1 for every pole
β’ Note this means the slope would change +2 for a complex zero or -2 for a complex pole.
6
Bode Sketching Rules (Gain)β Label the slope of the asymptotes
β’ Label the gain at DC and at the cornersβ Use your slopes and start from the DC gain
β’ This requires you understand logarithmic plots (and their βslopesβ)
β πΊπΊ2πΊπΊ1 = (ππ2
ππ1)π π π π πππππ π β΄ πΊπΊ2 = πΊπΊ1(ππ2
ππ1)π π π π πππππ π
β’ If the DC Gain is 0 or β, then you must select another portion of the graph to start your gain from
β Generally this means calculating the gain from the transfer function for a particular frequency to use as your starting point
7
Bode Sketching Rules (Gain)
β Calculate (and label) the gain at the cornersβ’ Real Pole: 0.707Gc
β’ Real Zero: 1.414Gc
β’ Complex Poles: πΊπΊππ2ππ
β’ Complex Zeros: 2πππΊπΊππβ’ Draw the Gain line
8
Bode Sketching Rules (Phase)
β’ Start with the phase at Ο=0β This will be zero unless there is a pole or zero at
the originβ’ In which case the phase will be
90*z (where z is the number of zeros at the origin)-90*p (where p is the number of poles at the origin)
β The phase changes +90/zero and -90/pole at the magnitude of the zero or pole
β’ Half of the phase change (+45/zero, -45/pole) occurs at the magnitude of the eigenvalue
9
Comments
β’ Note that these sketching rules produce very rough ideas for the bode plot (or the frequency response)β But the provide insight into design and
analysis.
10
Maxon DC16 Spec Sheet
https://www.maxongroup.com/medias/sys_master/root/8833376059422/19-EN-94.pdf 11
Example #1 (12 V Maxon DC 16 Motor)ππ(π π )πππ π (π π )
=πΎπΎπΌπΌ
πΏπΏπΏπΏπ π 2 + πΏπΏπ½π½ + πΏπΏππ π π + (πΎπΎπΌπΌπΎπΎππ + π½π½ππ)=
0.0156.405ππβ11π π 2 + 2.006ππβ6π π + 2.249ππβ4
β’ Two eigenvalues: S=-3.12e4 , -112β’ Ο1=0.032 ms, Ο2=8.9 msβ’ Note the dominant time constant is the βmechanicalβ
time constant on the data sheet.β’ GDC=66.7 rad/sec/Volt (this matches the no load
speed on the data sheet).
12
Im
Re
-112-3.12e4
Hand Sketch
13
>> bode(Ki,[J*L J*R+L*b Ki*Kb+R*b])
14
Example #2 (LRC Circuit)
15
L=1 HR=100 Ξ©C=10 mF
Im
Re-1-99
πΌπΌ(π π )ππ(π π )
=πΆπΆπ π
πΏπΏπΆπΆπ π 2 + π½π½πΆπΆπ π + 1=
0.01π π 0.01π π 2 + π π + 1
πΊπΊ 10 =0.1ππ
10ππ + (1 β 1)= 0.01
Hand Sketch
16
>> bode([C 0],[L*C R*C 1])
17
Example #3 (PID Controller)
πΉπΉ π‘π‘ = πΎπΎππππ + πΎπΎπππ + πΎπΎπΌπΌ πππππ‘π‘
πΉπΉ(π π )ππ(π π )
= πΎπΎππ + πΎπΎπππ π +πΎπΎπΌπΌππππ =
πΎπΎπππ π 2 + πΎπΎπππ π + πΎπΎπΌπΌπ π
=π π 2 + 15π π + 50
π π
18
Im
Re-5-10
Hand Sketch
19
β’ Notice positive phase shift (output βleadsβ input)β This is a property of derivative control
β’ It βanticipatesβ the output by using the derivativeβ’ However, notice the increasing gain
β Amplifies noise!
-1 +1
>> bode([1 15 50],[1 0])
20
Example #4 (Random System)
π»π» π π =50
(π π 2 + 2π π + 100)(π π + 1)=
50π π 3 + 3π π 2 + 102 + 100
21
Im
Re-1
10
99
β 99
Hand Sketch
22
>>bode(50,[1 3 102 100])
23
Example #5 (1/4 Car Model)
β’ Used to model vehicle ride (vertical motion only)
β’ For this example, we will ignore the damping
24
m2 F
k2
m1
k1
x2
x1
ΒΌ Car Transfer Functionsπ₯π₯1(π π )πΉπΉ(π π )
=ππ1
ππ1ππ2π π 4 + (ππ1ππ1 + ππ1ππ2 + ππ2ππ2)π π 2 + ππ1ππ2π₯π₯2(π π )πΉπΉ(π π )
=ππ1π π 2 + ππ1
ππ1ππ2π π 4 + (ππ1ππ1 + ππ1ππ2 + ππ2ππ2)π π 2 + ππ1ππ2
25
Im
Re
6
60
60
6
Im
Re
6
60
60
6
X1 Hand Bode Sketch (Car)
26
X2 Hand Bode Sketch (Wheel)
27
X1 Bode Plot (Car)
28
>>bode(k1,[m1*m2 0 m1*(k1+k2)+m2*k2 0 k1*k2])
X2 Bode Plot (Wheel)
>>bode([m1 0 k1],[m1*m2 0 m1*(k1+k2)+m2*k2 0 k1*k2])
29
Effect of Wheel Imbalance
β’ What is the force acting on the wheel due to a wheel imbalanceβ Same as the reaction forces on the pendulum
you did in a prior Matlab homework
30
RΟ
m
Ο
mg
RyπΉπΉπ¦π¦ = πππ¦ = π½π½π¦π¦ βππππ
π¦ = π½π½π sin ππ β π½π½π2cos(ππ)ΞΈ
π¦ = βπ½π½π2cos(ππ)If Ο=const
ππ = πππ‘π‘ + ππ0
π½π½π¦π¦ = ππππ βπππ½π½ππ2sin(Οπ‘π‘ + ππ0)
Effect of Wheel Imbalance
β’ It creates a sinusoidal force input!β Frequency of the sinusoidal input is the speed
of the wheelβ Notice the magnitude of the input force
increases by frequency (i.e. speed) squared!β’ 2nd order low pass filter would not remove
31
π½π½π¦π¦ = ππππ βπππ½π½ππ2sin(Οπ‘π‘ + ππ0)
π₯π₯1 (Car position)
β’ Remember the Bode Plot is ππππππππππππππππππππππ
32
π₯π₯2 (Wheel position)
β’ Remember the Bode Plot is ππππππππππππππππππππππ
33
Calculating Gain & Phase Graphically
β’ Also, since the gain and phase are calculated by evaluating the magnitude and phase of the transfer function at jΟ, you can also do it graphically.
β’ Recall that jΟ is essentially the imaginary axis on the s-planeβ Can find the gain and phase by calculating lengths from
the imaginary axis to the poles and zeros and the angles from the poles and zeros to the frequency on the imaginary axis:
πΊπΊ ππ =πππππππππππππ‘π‘ ππππ π‘π‘π‘ππ πππππππππ‘π‘π‘π π ππππππππ ππ ππππ π‘π‘π‘ππ πππππππππππππππππ¦π¦ πππ₯π₯πππ π π‘π‘ππ ππππππ π‘π‘π‘ππ π§π§πππππππ π ππππππππππππππ ππππ π‘π‘π‘ππ πππππππππ‘π‘π‘π π ππππππππ ππ ππππ π‘π‘π‘ππ πππππππππππππππππ¦π¦ πππ₯π₯πππ π π‘π‘ππ ππππππ π‘π‘π‘ππ π§π§πππππππ π
β ππ = β π§π§π π π§π§πππ π ββ πππππ π π π π π 34
Graphical Example #1
35
4
Im
Re
π»π» π π =π π + 4π π + 3
-3-4
54 2
Ο1Ο2
πΊπΊ 4 =4 2
5
ππ 4 = β7 ππππππ
Ξ¦1=53
Ξ¦2=45
Graphical Example #2
36
4
Im
Re
π»π» π π =π π + 3
π π 2 + 12π π + 52
-6 -310
5
Ο1
Ο3
πΊπΊ 4 =5
6 β 10 = 0.0833
ππ 4 = 0 ππππππ
Ξ¦1=0
Ξ¦2=53
Ο2-4
Ξ¦3=53