COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### help me with Impulse invariance

• Email
• Follow

```Hello dear
I try to make a program that implements the synthesis of recursive digital lowpass filter on the analog lowpass filter prototype with the sampling method the impulse invariant.
after studying the help section of the program
got the following:

Fd = 10000;% sampling rate
fp = 1000;% frequency bandwidth
fs = 1500;% frequency stop
Rp = 2;% maximum attenuation in the passband
Rs = 50;% minimum attenuation in stopband
Wp = 2 * fp / Fd;% Limit bandwidth
Ws = 2 * fs / Fd;% boundary of the stopband
[n, Wn] = buttord (Wp, Ws, Rp, Rs, 's');% calculates the minimum order analog Butterworth filter required to meet specified requirements.
[b, a] = butter (n, Wn, 's');% synthesis of analog Butterworth lowpass filter
[bz, az] = impinvar (b, a, Fd);% impulse invariant
[h, w] = freqs (b, a);% calculation of the frequency response of analog integrated system from its transfer function, given in the s-field
[hz, wz] = freqz (bz, az);% calculation of the complex frequency response of discrete system from its transfer function, given in the z-field
subplot (2, 2, 1)% divide the figure in box 2 by 2 matrix of object, with the number of Building 1 for the current plot
plot (w / (2 * pi), 20 * log10 (abs (h)))% frequency response graph in Hz and dB
title ( 'AFC of analog filter')% title graphic
xlabel ( 'frequency Hz')% name of the x-axis
xlim ([0 Fd / 2])% of set limits on the x-axis
ylabel ( 'amplitude dB')% name of the y-axis
ylim ([-100 20])% of set limits on the y-axis
grid on% the grid on the chart
subplot (2, 2, 2)% divide the figure in box 2 by 2 matrix of object, with the number of Building 2 for the current plot
plot (w, unwrap (angle (h)) * 180/pi)% plot  PFC (in degrees)
title ( 'PFC of analog filter')% title graphic
xlabel ( 'frequency Hz')% name of the x-axis
xlim ([0 Fd / 2])% of set limits on the x-axis
ylabel ( 'phase Degrees')% name of the y-axis
ylim ([-300 300])% of set limits on the y-axis
grid on% the grid on the plot
subplot (2, 2, 3)% divide the figure in box 2 by 2 matrix of object, with the number of Building 3 for the current plot
plot (wz / (2 * pi), 20 * log10 (abs (hz)))% frequency response graph in Hz and dB
title ( 'AFC discretized filter')% title graphic
xlabel ( 'frequency Hz')% name of the x-axis
xlim ([0 Fd / 2])% of set limits on the x-axis
ylabel ( 'amplitude dB')% name of the y-axis
ylim ([-100 20])% of set limits on the y-axis
grid on% the grid on the plot
subplot (2, 2, 4)% divide the figure in box 2 by 2 matrix of object, with the number of Building 4 for the current plot
plot (wz, unwrap (angle (hz)) * 180/pi)% plot  PFC (in degrees)
title ( 'PFC discretized filter')% title graphic
xlabel ( 'frequency Hz')% name of the x-axis
xlim ([0 Fd / 2])% of set limits on the x-axis
ylabel ( 'phase Degrees')% name of the y-axis
ylim ([-300 300])% of set limits on the y-axis
grid on% the grid on the plot

1. Where I made a mistake, because based on the graphics is that something strange instead of the desired filter
2.How to add to the figure of a graphical display of the impulse response of analog and discrete systems?
3.Sorry for my English
```
 0

See related articles to this posting

```"AHrap Golovin" <Aveng3r@uralweb.ru> wrote in message <hhdvpk\$rl5\$1@fred.mathworks.com>...
> Hello dear
> I try to make a program that implements the synthesis of recursive digital lowpass filter on the analog lowpass filter prototype with the sampling method the impulse invariant.
> after studying the help section of the program
> got the following:
>
> Fd = 10000;% sampling rate
> fp = 1000;% frequency bandwidth
> fs = 1500;% frequency stop
> Rp = 2;% maximum attenuation in the passband
> Rs = 50;% minimum attenuation in stopband
>Wp = 2 * pi * fp;% passband edge frequency (in rad / s)
>Ws = 2 * pi * fs;% stopband edge frequency (in rad / s)
> [n, Wn] = buttord (Wp, Ws, Rp, Rs, 's');% calculates the minimum order analog Butterworth filter required to meet specified requirements.
> [b, a] = butter (n, Wn, 's');% synthesis of analog Butterworth lowpass filter
> [bz, az] = impinvar (b, a, Fd);% impulse invariant
> [h, w] = freqs (b, a);% calculation of the frequency response of analog integrated system from its transfer function, given in the s-field
> [hz, wz] = freqz (bz, az);% calculation of the complex frequency response of discrete system from its transfer function, given in the z-field
> subplot (2, 2, 1)% divide the figure in box 2 by 2 matrix of object, with the number of Building 1 for the current plot
> plot (w / (2 * pi), 20 * log10 (abs (h)))% frequency response graph in Hz and dB
> title ( 'AFC of analog filter')% title graphic
> xlabel ( 'frequency Hz')% name of the x-axis
> xlim ([0 Fd / 2])% of set limits on the x-axis
> ylabel ( 'amplitude dB')% name of the y-axis
> ylim ([-100 20])% of set limits on the y-axis
> grid on% the grid on the chart
> subplot (2, 2, 2)% divide the figure in box 2 by 2 matrix of object, with the number of Building 2 for the current plot
> plot (w, unwrap (angle (h)) * 180/pi)% plot  PFC (in degrees)
> title ( 'PFC of analog filter')% title graphic
> xlabel ( 'frequency Hz')% name of the x-axis
> xlim ([0 Fd / 2])% of set limits on the x-axis
> ylabel ( 'phase Degrees')% name of the y-axis
> ylim ([-300 300])% of set limits on the y-axis
> grid on% the grid on the plot
> subplot (2, 2, 3)% divide the figure in box 2 by 2 matrix of object, with the number of Building 3 for the current plot
> plot (wz / (2 * pi), 20 * log10 (abs (hz)))% frequency response graph in Hz and dB
> title ( 'AFC discretized filter')% title graphic
> xlabel ( 'frequency Hz')% name of the x-axis
> xlim ([0 Fd / 2])% of set limits on the x-axis
> ylabel ( 'amplitude dB')% name of the y-axis
> ylim ([-100 20])% of set limits on the y-axis
> grid on% the grid on the plot
> subplot (2, 2, 4)% divide the figure in box 2 by 2 matrix of object, with the number of Building 4 for the current plot
> plot (wz, unwrap (angle (hz)) * 180/pi)% plot  PFC (in degrees)
> title ( 'PFC discretized filter')% title graphic
> xlabel ( 'frequency Hz')% name of the x-axis
> xlim ([0 Fd / 2])% of set limits on the x-axis
> ylabel ( 'phase Degrees')% name of the y-axis
> ylim ([-300 300])% of set limits on the y-axis
> grid on% the grid on the plot
>
> 1. Where I made a mistake, because based on the graphics is that something strange instead of the desired filter
> 2.How to add to the figure of a graphical display of the impulse response of analog and discrete systems?
> 3.Sorry for my English
found my mistake and corrected, but now I get a message
Warning: The output is not correct / robust.
Coeffs of B (s) / A (s) are real, but B (z) / A (z) has complex coeffs.
Probable cause is rooting of high-order repeated poles in A (s).
> In impinvar at 124
```
 0
Reply Aveng3r (1) 12/30/2009 6:57:02 AM

1 Replies
329 Views

Similar Articles

12/20/2013 4:24:46 PM
page loaded in 4973 ms. (0)

Similar Artilces:

DSP-impulse invariance method
Now, I use the impulse invariance to design a lowpass filter. I need to find the H(s) from pole pairs. I don't know how toconvert H(s) to H(z). Can anyone help me? Thanks!! Laura <laura_pretty05@yahoo.com.hk> wrote in message news:1142180317.710183.32790@z34g2000cwc.googlegroups.com... > Now, I use the impulse invariance to design a lowpass filter. I need to > find the H(s) from pole pairs. I don't know how toconvert H(s) to > H(z). Can anyone help me? Thanks!! > > Laura > Expand H(s) in partial fractions and use the tables. Tam The impulse invarianc...

HELP: VAR Impulse Response Function algorithm
I need an algorithm to obatin the impulse response function of a VAR. My problem is this: the VAR is Xt = B(L)Xt-1 + et Xt is a vector of variables and each variable has n observations (t is time) B(L) is the polynomial lag operator (of order p) and it is a matrix so B(L) = B0 + B1L + B2L^2 + ... + BpL^p each Bi is a matrix of coefficients et is the vector of errors E(et) = 0 and E(et et') = S (the covariances are <> 0) If zt is the vector of uncorrelated errors (covariances = 0) then D*zt = et where D is a matrix of coefficients The working paper I'm using as referenc...

Help to interpret impulse response of an fixed point IIR filter
I have done an impulse response of an IIR filter. The impulse response of the filter does not return to zero but stops at a level close to zero (I think it�s because limitations in fraction bits). The filter is implemented in fixed point arithmetic�s. And when I make an FFT of the impulse response de 0 Hz gain is not 0 dB as I would like it to be. But when I run a step response I get almost perfect 0 Hz gain of 0 dB. So the problem is that the FFT of the impulse response says the gain is not 0 dB at 0 Hz but the step response says the gain is 0 dB at 0 Hz? What should I do? Not ...

Question about IIR filter design using Impulse Invariance method
I am designing low pass IIR filter using Impulse Invariance method. I've got transfer function H(z) which depends on impulse sample period T. I was asked to choose an appropriate impulse sample period T for H(z) such that the input signal x(t) = 5 cos(2pi(8000)t ? pi/3) ? 4 cos(2pi(40000)t + pi/2) sampled at a rate of Fs = 100 kHz has only the 8000 Hz sinusoid in the passband. I don't understand what is relation between impulse sample period T and what sinusoid will be in the passband of the filter. My understanding is that impulse sample period T determines where aliasing start...

Help Help Help Help Help
please,help us . we have a seious problem, we are designing a radio controlled car that is guided by the PC, to send the data wireless between the PC and the Car and vice versa. we use 2 transmitter/reciever circuits from 2 seperate radio controlled car each running with a different frequency (27 MHz & 40 MHz)and modify the functionality of each to do the disered work. but on mounting a transmitter(40MHz) and reciever(27MHz) on the car, and attach another transmitter(27MHz) and reciever(40MHz) to the PC; we found that on sending signals from the car to the PC on the transmitter & rec...

Help!! Help!! Help!!
I wish to vectorize the following code: s = tf('s'); W = logspace(-1,2,50); COMBINATION = combn(W, 2); K = cell(length(COMBINATION), 1); K0 = 1 + (1/(2*s)) + 0.5*s/(0.2*s + 1); % PID controller to be approximated as PI gapValue = zeros(length(COMBINATION), 1); for i = 1:length(COMBINATION) K{i} = (COMBINATION(i,1)*(1 + (1/(COMBINATION(i,2)*s)))); % PI controller end for i = 1:length(COMBINATION) gapValue(i,1) = gapmetric(K0, K{i}); end where K0 is the Nominal transfer function and K is a cell array including transfer functions whose gap metric from K0 are...

Help, Help, Help...
Hei! Im makin a hot INVADERS game with Java but im a newbie with language, so , question is how do i use KeyPressed () function... I hav Applet Runnable... -!Hei!- Here is my problem... public class TestinKeys extends Applet implements Runnable .... .... public void run () { while ( true ) { KeyEvent ke; if ( ke.getKeyChar() == 'a' ) g_TykkiX ++; .... .... What is Wrong, im tryin to make that Invaders game but i dont know how to read keyboard with Runnable Java code... JariTapio <JariTapio@pp.inet.fi> wrote: > publi...

Help Help Help