DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Nov 1: register now to lock in today's rate
Register Now →

Basic understanding problem of continuous-time to discrete-time conversion

Started by Georg P. ●December 5, 2007
okay, let's make this less pitiful.

On Dec 5, 6:39 am, "Georg P." <ponti...@sbox.tugraz.at> wrote:
> > Assuming I have a time-continuous first-order lowpass filter given by > the transfer function > > 1 Wc > Hc(jW) = --------- = ------- > 1 + jW/Wc Wc + jW > > where W is the (continuous-time) frequency in rad/s and Wc is the > (continuous-time) 3dB-cutoff frequency of the filter. Now I want to > create a time-discrete system with the same transfer function.
you can't do it. this is because fundamentally, a continuous-time system is built out of adders, constant multipliers (scalers), and integrators (w.r.t. time). a discrete-time system is built out of adders, constant multipliers (scalers), and unit delay elements. the integrators in continous-time are the fundamental blocks that discriminate with regard to frequency of the signal. they are the only devices that have some concept of "time". likewize the unit delay elements in a discrete-time filter are the only things that can discriminate with regard to frequency. if you didn't have either these integrators or delays, you could not make a filter that would know the difference between a frequency component of some frequency and another component of another frequency. without those components, you could only have a "memoryless system". but a delay is not an integrator. in the continuous-time world, the integrator has transfer function of: (j*W)^-1 or e^(-ln(j*W)) and a delay has e^(-j*w) so, how can your -j*w be the same as -ln(j*W) ? we don't have a device that does the natural log, but we can approximate it and the bilinear transform is one such approximation: ln(u) approx= 2*(u-1)/(u+1)
> Therefore I use the formula of impulse-invariance > > H(e^jw) = Hc(jw/T)
that is not the formula for the impulse-invariant technique and never has been. what the impulse-invariant technique is h[n] = T* hc(n*T) where H(z) = ZT{ h[n] } and Hc(s) =LT{ hc(t) }
> where w is the (discrete-time) frequency in rad and T is the sampling > period. This gives: > > wc/T wc > H(e^jw) = ----------- = ------- > wc/T + jw/T wc + jw
so already, by this point, we're just wrong. i cannot salvage this and do not know how to comment on the rest. ...
> Can anyone explain this to me? Is the term e^jw in time-discrete > transfer functions just symbolically and can be replaced with jw?
no. the essentially not the same thing, although there is a relationship. perhaps consult your OSB. essentially, it is true that to evaluate the frequency response of your digital filter you evaluate z = e^(jw) where w is *normalized* radian frequency (when w = pi, we call that frequency "Nyquist"). also, the Z-transform is equivalent to the Laplace Transform where the discrete sequence, h[n], is attached to unit impulses (Dirac deltas) before applying the LT. so, with that connection, you have a means of relating the frequency response of your dicrete-time filter to our regular continuous-time life. now, it turns out, that when you sample in one domain (time or frequency) that has the effect of causing in the other domain (frequency or time) that the data is repeatedly shifted (with an infinite number of copies), overlapped, and added. so if you sample in the time domain, you take your original spectrum (what you had before its time signal was sampled) repeat and shift it for every multiple of the sampling frequency, Fs, and add up (overlapping if necessary) all of those repeated shifted copies of the spectrum. if they *do* overlap and add, we call that aliasing. now if you do that to the continuous-time impulse response, h(t), (and that is what you do, when you do "impulse-invariant") then what you get in the frequency domain is a similar spectrum (as what you had in the time domain), but it will be shifted at multiples of the sampling frequency and overlapped and added. and there *are* tails that get overlapped and added becaue i recognize your continuouw-time frequency response as that of an (analog) low-pass filter. it may approach zero, but does not get there, even as f --> infinity. so there are tails that overlap and add, so just like aliasing, your frequency response will be a little different. r b-j
robert bristow-johnson wrote:
> okay, let's make this less pitiful.
Thanks :-)
> On Dec 5, 6:39 am, "Georg P." <ponti...@sbox.tugraz.at> wrote: >> >> [...] >> Therefore I use the formula of impulse-invariance >> >> H(e^jw) = Hc(jw/T) > > that is not the formula for the impulse-invariant technique and never > has been.
This is where I got things wrong.
> what the impulse-invariant technique is > > > h[n] = T* hc(n*T)
Accepted. My solution now looks like this: 1.) I transform Hc(jw) to hc(t) via inverse FT 2.) I switch to the time-discrete world via impulse invariance (the formula above) and get h[n] 3.) I calculate the frequency response H(e^jw) via DTFT Then the final result is pi H(e^jw) = ----------------------- 2 (1 - e^(-pi/2-jw) ) I also got this before my first posting, but was confused since it looks so different from the formula of Hc(jw).
> there *are* tails that get > overlapped and added becaue i recognize your continuouw-time frequency > response as that of an (analog) low-pass filter. it may approach > zero, but does not get there, even as f --> infinity. so there are > tails that overlap and add, so just like aliasing, your frequency > response will be a little different.
I guess that explains my confusion. After re-reading chapter 4 of OSB (and a bit more mindful this time), I must confess that I should have been able to figure that out myself. In that sense, sorry for stealing your time and thank you very much for the long and detailed explanations. Georg
pnachtwey wrote:

> The technique I think you are looking for is the matched z transform > or MZT.
The term matched z transform is completely new to me. But it seems to do the same in z- (respectively s-) domain as how I solved it now (see my other posting) in time-domain.
> There isn't much info on the web so I will help out > > You must replace all poles (s+Wc) in the s domain with Wc/(1-exp(- > Wc*T)(1-exp(-Wc*T)*z^-1) > so Wc/(s+Wc)= Wc/(Wc/(1-exp(-Wc*T)(1-exp(-Wc*T)*z^-1)). > > When you simplify this the result will be H(z)=(1-exp(-Wc*T)*z/(z-exp(- > Wc*T)). From this it is easy to convert to a difference equation. > y(n)=exp(-Wc*T)*y(n-1)+(1-exp(-Wc*T)*x(n). > You can see that Wc/(1-exp(-Wc*T) scales the result so the gain will > be zero when z=1 or the steady state value. > > What I like about MZT is that it doesn't add poles and is accurate in > that the coefficients don't have to be warpped. It is also easy to > memorize unlike the z transform tables. I rarely use Tustin's > approximation.
Thanks a lot for your explanations! Georg