 So far we have seen this kind of a signals flown domain and now we will see its effect on the system. So one can ask this a fair question to ask, if we are saying that the Shannon electric construction reconstructs the signal back in the frequency domain by using this kind of a filter, which is, you know the T is a scale for the signal and it is like ideal kind of a filter, so a kind of a filter which is short cut off kind of a signal filter. If we see this in the frequency domain, these kind of reconstruction, what is the kind of filter that we are applying to reconstruct this back, it is nothing related to a signal what are the samples, no, it has nothing to do with what are the samples, it has something to do with how we reconstruct the signal back, so this in the frequency domain represents like some filter of this sort, this filter is having this kind of a representation in the frequency domain, how that comes will not get to do better, but I mean just kind of use some field and if it is not ideal reconstruction, then what is, then this is answer that, it is a reconstruction of the start and it is kind of allowing some value beyond this omega is over 2 also to get, so something if it is existing for the signal when it is sampled, you may have something coming in this domain also no, even if the signal is not aliased, there will be some part of the signal coming in here, that signal will get also getting some representation when it is, that is a kind of a meaning one can think about, so this is a filter, so one has to have little bit of a sense of, when we talk of filter, see this is a sense that we talk about, the filter is in the frequency domain allowing some signals to pass through and some signals are completely not allowed to pass through, so say when I say the filter is of this form and like no rectangle kind of a form, then this particular kind of a filter function in the frequency domain, multiplies by frequency domain response to produce the output of the filter, that is what that is how one can think about, so it is like a input which is going getting into a transfer function and then transfer function is modifying that input and producing some output, so every system from that perspective can be seen as a filter also, so this is nothing but a frequency domain response of a filter, so transfer function what is the frequency domain response, when you have a transfer function what is frequency domain response of a transfer function or frequency domain representation of a transfer function or when you substitute s is equal to j omega in the transfer function and get a magnitude and plot it, what you get? The Bode plot. It's Bode plot, right exactly, it's like a Bode plot of a system, so this filter is nothing but Bode plot of the transfer function of that filter basically, in frequency response, frequency domain response of this filter is nothing but the Bode plot of that filter, I mean this kind of a you know sharp cut off filter is impossible to realize mathematically completely, but if it has been there like that it is kind of arguments that Shannon has given actually, so this filter transfer function, its frequency domain representation is giving you this kind of a plot which is Bode plot of that what you know transfer function that is the filter transfer function and when you pass this sample signal through that filter means like you know you are multiplying the frequency response of that sample signal by the frequency response or frequency representation of a filter function or Bode plot of the filter function to produce this that's the idea of you know filtering or it's the same idea when you have a input even to the system in the frequency domain and you pass it through the transfer function or this transfer function that input is given to the transfer function and it transfer function is producing some output okay then this say suppose input is a sinusoidal frequency simple sinusoidal input then it will get just get scaled by the transfer function form and at scaling it will be dependent upon what is this response or Bode plot of that transfer function okay that's the kind of idea that is there for the filter it's the same idea as you have a input representing the frequency domain, transfer function representing the frequency domain and like the output coming as a frequency representation okay so they two are not different the filter is not different from any kind of transfer function kind of a thinking input plot domain okay so that that is a important kind of a concept and we say okay I want to filter this signal so we need to think when the moment you say filtering of a signal you need to typically think in the frequency domain first kind of they can get my my filter okay so we'll talk about me pick about filter later in more detail so right now we are just kind of looking at the signals and like you know we are filtering this some of the signal and to to show that okay the channel reconstruction may become reproducing this signal completely back but now if you see instead of channel reconstruction I had this you know the the reconstruction which is zero order hold then see this is omega zero this omega s by two frequency here and this is omega s here you remember that that frequency domain response was going up to omega s so some part of this function will also come up in my in my you know filter signal or in my signal represented as a zero order hold form okay so see some of these are you know one has to be very clear in in in the mind about which domain you are thinking okay if you start thinking in like you know mix up the domains of thinking then like you know typically I've seen the confusion arises okay so we are clear here that okay we are thinking only the frequency domain and in the frequency domain we know that zero order hold has some kind of a form that is dotted up here this is a frequency domain zero order hold kind of a thing will be like that okay and when it is like this then what will happen to my signal is what I'm thinking in the soil and I'll get some barping of this triangle to happen instead of this triangle getting produced a complete reproduced completely like this I'll get this kind of a bar because this is not really a triangle kind of a window and then you know the additional part from the signal also in my form okay so one can kind of think okay this is how it will get dotted in the frequency domain there's a frequency domain representation of a signal which is having a zero order hold okay so see this is again a frequency domain representation of a signal which is sampled just sampled okay so this is just sampled signal and now we are seeing from the sample when we do some kind of reconstruction what is this frequency domain representation is what we are kind of considering here okay so sampled signal we already know has this kind of a molecular replica of the original signal frequency domain response coming up but what we are like looking at further is that okay if I now have those samples like you know represent as a zero order hold then what is going to be the for that kind of reconstruction for the frequency domain representation okay so so although that has not much of a you know physical value or like know implementation value in some sense but it's kind of just go to know right okay for this such a kind of a zero order hold there's a the signal if it has triangle kind of representation in a original frequency domain analog signal then it will get represented in some kind of a warped way when it is sampled and notice sampled sampled and made a zero order hold okay so this is important not just sampled sampled and like a reconstructed as a zero order hold that is a very important statement otherwise if just a sample signal it will have just a mirror image okay so there's a there's a certain difference between the in the so then warping the frequency domain is is happening is is somewhat kind of like no indication I mean what cannot really get what you say intuitively uh seeing that okay this this means it will be but you know it will have some difference it will have some kind of a warping but we cannot predict exactly what will happen only by doing this mathematics one can have be able to say okay well exactly this this point of a part is getting multiplied by this you know the the the straight line if it is if at all it had been a straight line like see the straight line what we are saying the triangle is just our kind of a sense of representation that the signal has a contents up to that point but even there like you know those things are going to get kind of somewhat disturbed so the signal contains a different frequencies are getting disturbed in in some sense when I when I say it is bar so let's let's move further then uh so now uh we just see some small activation of sampling theorem like now how do you think about uh you know a system um say for example um if you are like developing a system uh typically before getting into uh sampling you use this low pass filter okay now you use this low pass filter to make sure that beyond certain frequency the contents are are made zero okay otherwise if you uh take a take a generally like uh like uh allow the main signal and see its frequency contents you'll find the frequency contents to go all frequencies are represented in some way okay so so to make sure that you know higher frequencies are are uh completely chopped down you you use this low pass analog filter now this analog filter you you know that you can use some simple axis that get to kind of get this analog filtering done and uh now once you do this then one can think about okay now if I'm sampling see if if if you want to really preserve like you know all the contents of your signal and make sure that okay you're representing your signal really in a better fashion this is a way to to do stuff actually use this analog domain filter but you cannot you cannot have analog domain filter with a very low cutoff okay because uh with a low cutoff uh you may get into um either you may lose some part of for your signal that you want to kind of preserve or what will happen is like the you know the the first order filter does not have a sharp cutoff these rc filters are first order filters they'll have a slope okay so so that slope will allow some frequencies and uh and uh uh higher than the cutoff also to pass through if you know one word tau s plus one is a is a is a um you know transfer function for the first order domain system then uh its boat plot is simply like you get by by using this tau corresponding to tau one over tau is your cutoff frequency and beyond the cutoff frequency you'll have a 20 dB uh magnitude I mean the slope uh cutoff will happen there okay so so that slope is what is going to cause like no some of the higher frequencies also to kind of come um beyond cutoff you know those those frequencies will come uh and get with the signal okay so so you know you typically require ideally a sharp cutoff filters but then sharp cutoff means like no your your um cost is going to increase okay you cannot use simple rc circuit to kind of get a sharp cutoff okay so i would say that it will give you only the first order kind of a cutoff um yeah so so this first order filter you used uh and i know sample now your signal uh frequency is with a larger frequency so that is this uh some of these um um uh signals which are getting uh like no past beyond the the cutoff frequency they also get represented uh in a in a um in this like no high frequency large sampling frequency will will preserve those frequency content and then uh then uh uh is is the signal is further persist for for for any operations um so that it will get like you know uh completely so so we can have multiple kind of operations that can be possible beyond this point so so the idea here is to use first analog domain filter so you don't kind of directly get into um sampling given a signal okay the given signal you know what is the frequency content that you are in of interest to you and use that as a cutoff for your rc circuit to develop and use that circuit on board uh you know before the signal is is taken into your uh micro that is right once it is there in a micro you sample it at a really high frequency and and so that it is all the contents are are kind of preserved okay and then you can take note uh once it is content episode and there you are then uh you can take a call based on the frequency response representation of the signal what to do okay you can use some kind of uh you know digital domain signal uh digital domain filter to further filter the signal and anything like that okay some some kind of a you know uh further processing can be done easily and one of the ways uh is is is uh so so you you have this signal of interest here is represented typically by our triangle kind of uh representation and then there is a white noise okay which is all frequencies then you use this it's called anti-aliasing filter okay so this is analog domain rc filter is typically used and then you can get like you know the signal representation at 0.2 so you you can think okay look with rc filter what will be then like you know the signal representation in the frequency domain at this point will look like okay then for this is one of the examples so so so you should be able to kind of uh given this filter uh filter function one can see okay what is the frequency domain representation coming out these are all i'm not naming this access but like you know this is a filter frequency domain f of j omega of the signal and uh this is omega actually something like that uh so this all whatever is represented here is all in the frequency domain okay so all these signals which are coming out here they'll be represented as a as a frequency domain signals okay so there here there will be a representation where the original signal will be there and then with the sharp cutoff with the anti-aliasing rc filter you'll get this signal beyond this point tapered down like some value here so so this 20db sloping cutoff will kind of taper the signal off from here to some value which is very less it will not be kind of a constant going over like that okay as the frequency increase like you know this this filter will have a effect that it will it will like you know they send the high frequency signals okay it will completely chop off the high frequency signals or taper off the high frequency signals and then when you sample it then then the samples will be represented in some way then you can see that okay uh how these samples after sampling how this signal is going to look like and how we want frequency action sample so that is uh uh you know this tapering off part does not get mixed with this uh the signal itself okay the signal the signal of interest we need to preserve under like you know the sampling okay so after sampling has happened you know that okay this whatever this original signal frequency response is going to get replicated or mirrored multiple places at omega s kind of frequency okay so so uh we should be we want at those those those uh when that is happening we don't want this high frequency conference to come into the domain of that signal of interest okay um so that is what we want to make sure of this so so i would suggest like you know at you you park under over this example and like you know actually start like you know writing these uh you know sketching this signal represented in frequency domain at these multiple locations and then uh you see whether uh you know how the things are making sense uh so these are very different different operations there is a anti-valuasing error of filtering your operation is happening here then sampling operation is happening here then you can have some kind of a shaft of digital filter is given here this is like some kind of a digital filter uh ideal i would say it's not like no practical filter there is a we cannot have like any shaft of practical filter possible in key treatment also so uh if that is there what is the signal representation up here and there is at least something called down sampling okay so this down sampling just means that you know you skip the samples so you you have real signal sampled at say frequency omega s then the down sample signal by factor of three will be the same signal when sampled at frequency uh omega s 53 okay that's how that's what it means actually the down sample so what you do is like no out of these multiple samples you take one sample omit two and take third sample then take omit two again take next third sample like that you can keep on doing that so you omit the samples in between okay that's how you you get a new signal which is down sample why you need a down sampling is to kind of like no save the memory okay so if you have not down sampled a signal you have a lot of samples will be will be stored into your memory okay so so so down sampling should not see this down sampling sometimes may create some somewhere of a aliasing effects we don't want those aliasing effects to be uh created so so then you what you need to like you know have this cutoff frequency for the sharp cutoff data to be properly adjusted to do the whole you know the engineering points to be work out as as as an engineer you will okay oh no this down sampling may not work i down sample only by factor of three or or or i'll have to like cut off these too much lesser frequency so that is down sampling does not produce aliasing those kind of thinking is is what i'm calling as that for some kind of engineering definition we done so the fundamentals for that are on there so far we have talked about it's the application here to kind of see how one can process this signal to to finally get it in the form that is uh no use in the control position okay so beyond this okay or beyond this point or even after sampling you can start using the signal for control purpose no problem you don't need to kind of sharpen off these and then do these operations at all so so you you do just a analog filter and then sample it uh high f and sampling frequency and you'll be able to kind of go or you may say okay i need to remove these some some kind of parts on the sample so that i can have a better processing possibility with the down something then you do these initial steps and reduce your number of computations okay so so this is like you know one of the examples of uh how do you start thinking about sampling and use that in in a typical metatons kind of a domain application okay so i think we may not have much time until we go today but so next part is what we talk about is say suppose we have this uh so i'll just give you a flavor of this uh we're not getting a lot more details here and uh we may kind of come to the point where we need this uh e to the power you know we had this question somebody asked at e to the power a matrix power of like an exponential of a matrix where do we need to where we want i mean where we need to use that okay this is the place where we use that okay so so the question here is really like if your actuator is getting the signal of this sort now we should be know why the actuator will get a signal of this sort okay so this signal is received by actuator then actuator will be implementing this signal on the plant okay uh just amplified version of the signal on the plant now under such scenario however my plant is going to be okay so a plant is not really receiving a continuous input but input is now received in this kind of sample and zero order fold can perform okay so so the this question is what we need to answer here and for that uh we we consider our system solution ridiculous okay the systems in a continuous domain like now if you didn't signal system as a state space system okay so uh we we know what is state space definition now okay so with the state space definition of of the form x dot is equal to x plus du and y is equal to cx only up to that we don't consider du kind of a form in the plant so x dot is equal to x plus du and y is equal to cx in that kind of a form if i sample this signal or the input is given in this kind of a form to that signal so so when i when i say i sample the system means my input is going into this kind of a form okay that's a that's a terminology that people use okay this is a sample system okay or this is a continuous system or this is a sample system or digital domain system so so if i have uh my input going in this kind of a action on my system then uh how my system is going to behave is what i want to uh derive mathematically and that's when i start off with the the the solution of a system in this form very you have this homogeneous part of the solution and then you have a particular integral part of the solution okay is both the forms are there and x0 is like in your initial condition and and this is how like your your solution of the system of the form uh x0 is equal to x plus du will be okay so now when i have so this x is typically a vector here and b is again a vector and we are considering only single input to this system and u is a single input that is going into the system now if i want to like you'll see that this form is implemented like u is of this kind where u is constant over the time period 0 to t t to 2 t to 3 to 3 t like that u is constant so this is i i can call this yet i'll say u 1 u 2 u 3 like that and give some kind of a you know discrete kind of a values to do under that scenario what is going to happen so so now my system is is say at some point here in general xk kind of a value and i want to see what is my system how my system evolves over with the constant input given here as uk till the point like no xk plus one okay what is my xk plus one okay xk plus one of t okay when i start at xk t okay so this is my xk t so i use the same form i have started with the initial condition xk t here and then like you know its evolution from now time over time which is t is starting from 0 to t here now which is k t to t here okay so this k k plus one t minus k t will be there so k t to k plus one t is what is the evolution i'm looking at so so here evolution is from t is equal to 0 to t is equal to small t so like that when it is is equal to k t to t t equal to further t is equal to k t plus k plus one t this will be the evolution okay that's what i'm presenting here okay this is a this is a homogeneous part and the the the interesting thing will happen over this part okay now this u of tau is going to be a constant value here okay between the values k t to k plus one t you have a u of tau to be constant okay so say say 2 t to 3 t u of t is equal to u of 2 t is equal to constant okay so that is a value that is constant here and that constant will come out of this integral and i get this so in a in a machine that form 90s okay so uh so what i'm going to get here is so e to the power 80 here so this is sorry this is a matrix if you see k plus one t minus k t which is going to give you the power 80 and x of k t here okay so now i'm dropping this capital t to kind of like to make the lights really simpler so instead of this capital t i will just keep it as k plus one so x of k plus one is equal to e to the power 80 times x of k plus now this integral from 0 to t if you shift is you know the time axis shifted then like you know you get this implication here 0 to t e to the power some variable s here a s b and d s okay so so this s is some other variable that is used to to replace this tau okay so so this is and this is given here what is this s variable and all this thing here so so you get these two matrices here now okay and this is where like you know you get this you already hit the power 80 function here and one can now start representing this x of k plus one as some function which is now now characteristics function for the system this doesn't have anything related to k and this is also doesn't have anything related to k these are like characteristics functions characteristics matrices of the system which are going to give you a system in the digital form okay so this is a form the system is coming into x of k plus one is equal to five of a t now this this function is the it's a function of sampling time t and then like you know this is a psi of a of a t times u of t okay so this is a form that you get for your digital system and y k is equal to c times x k this remains the same there is no no change in this form okay and then these matrices are defined here okay and now this opens up like a completely new domain of you know analysis or or systems in the digital form okay x of k plus one is also you you can transform the system from your analog domain to a digital domain by using this kind of a zero-order hold kind of a form okay so this is what is happening when you use in MATLAB also while converting the system from analog domain to digital domain if you use that zero-order hold kind of a option then it is precisely okay so I think maybe this is enough for us to you know stop here I mean there is a good amount of discussion that can happen further about you know how do you now use this digital domain so so this is the most important crux of like you know how do you go from an analog domain to the digital domain okay like very nicely from physics understanding the physics of it I mean many times like people just say okay well like we just use zero-order function but what is a zero-order function how it comes where is it like no genesis of it happens so those are kind of parts are where this is in this part is very important so so this x of k plus one if we get into the c domain definition of like this c transform domain definition is c transform of x of k plus one is c raised to one times like x of c or something so we will not get into that detail but but basically this is a this is some kind of a shift operator that is happening okay shifting of the of the signal with one sample so x of k plus one is equal to z x of k okay that is how one can see in the c domain okay so so that kind of operators can be introduced into this form to get now a new you know transfer functions in the in the discrete domain okay so this this is what is a is the next step and all that now like you know we can develop this domain of digital systems and all the tools that we have proved over some analysis or this like this analysis you know you will find some equivalent representation in the digital domain that you can have a transfer function in the digital domain and then you can define some new conditions for the stability of the transfer function in the digital domain and I think that all these things can be you know slowly developed further okay so that is what you know this this digital digitization of the system starts giving you all this kind of multiple tools at your hand to do that and see so if for some reason you cannot like know use higher sampling time see most of the time when you have a lot of controllers use higher sampling time and you'll be fine okay you'll not be so bad in implementation of control and things like that but whenever you feel that way oh no I must use like no lesser sampling time okay then you may need to trigger the digital domain analysis of the system to make sure that you know you whatever your designs are are not kind of you know getting any any worse performance out of your system so one can like you think in the digital domain itself and design controllers in this domain itself to to make sure that you know your system will work even if like your sampling is a little less so then that that typical figure for the sampling frequency to be is is you know it should be at least three to four four to five times more than your closed loop type of frequency okay that's like a part figure one can you know based on experience or how it comes like you know you one can do a whole analysis about that but part figure is like you know about five to six times more than your bandwidth of the system should be your sampling then then your controller will be implemented okay