Artificial intelligent assistant

Please explain how to make a bode plot and find 'gm' and 'pm'

hello friends welcome back to method today we are going to learn about how to make a bode plot in MATLAB but before that we have to know what is frequency response analysis the steady state response of a system to a purely sinusoidal input is defined as frequency response of a system in such a method frequency of the input signal is to be valid over a certain range and the resulting response of the system is to be studied such system is called the frequency response now we learn about bode plot so the bode plot is a frequency response plot of a sinusoidal transfer function of a system a bode plot consists of two graphs one is a plot of magnitude of the sinusoidal function versus the log Omega and the other is a lot of the phase angle of a sinusoidal transfer function versus log Omega so the bode plot can be drawn for both open loop and closed loop system but usually it is done for the open loop system now let us jump to the MATLAB and see how to make the bode plot in MATLAB so for making the bode plot first we need a transfer function and for transfer function we need the numerator and denominator of the circle so I am taking here a numerator as 2 under denominator as s square plus s and I am denoting my transfer function as G 1 so the transfer function is it is to open a subscribe glasses and now to make the water part of this we simply type water and in the bucket the transfer function now the bode plot is done and here you can see the bode plot so as discussed earlier the bode plot contains two diagram first is for magnitude plot and second is for phase plot now if we want to compare to Buddha plots simultaneously then we want it on a single graph so for making the another photograph we are gonna need the numerator and elevators so I am quickly taking the numerators and innovated and I am changing the denominator as a SS square plus 0.5 as now the transfer function now you can see the transfer function has to open a C square plus 0.5 s and now we want to make the bode plot of that cool transfer functions so here is the bode plot of two transfer functions simultaneously so here you can compare the two transfer functions and this red line is for the g1 and the Green Line is 42 and you may notice that there is a huge difference between the phases and this difference is created because I have changed the data value in the denominator and here you can see that in cheater value is a 1 for this a bit diagram and so the phase margin is a more positive work than the Greenland diagrams of phase margin so in this way you can compare to bode plots and simultaneously now here we can also find the gain margin and phase margin of that would applaud so for that we need a bode plot first so I am quickly making our bode plot so here I have made the bode plot and I have made the bode plot of this function and the Lord is this now to find the gain margin and phase margin we have to simply type the GM and then p.m. that is gain margin and phase margin we can also find the frequency at which the gain margin and phase margin has occurred so for that we type WG n and then wpm and now the syntax is margin of the transfer function then so the transfer function is G here now you can see here in the workspace the GM p.m. and all the steps are done to see that we have to type the variable name so the GM is 0 and why we can see it in the figure so from the definition you should know that we have to check the magnitude at the frequency at which the phase diagram has cut the 180-degree line so from this diagram you can see that this graph hasn't cut the 180 degree length so the gain margin is zero here now see the phase margin and it is shown here the minus 40 0.975 degree now check it in the figure so in this figure you can see the the zero line is across to here so that figure it is almost a zero you can see so the frequency is a here to 0.85 5 now look it into the frequency sorry the phase response now you can now see the phaser is a minus 1 DT so if you add here a 180 degree so you will get minus 41 degree so it is a very near about this phase margin so in this way you can find the gain and phase margin now we look into the frequency in which the phase margin has occurred so it is shown here point eight six eight five so it is a very near about of our frequency so in this way you can draw a bode plot and find the parameters from it thank you for watching this video and please comment below if you have any doubt and don't forget to subscribe this channel

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 2b9e5e16a982b9a525a802564aaaaaef