High pass Filter Design

MrAl

Joined Jun 17, 2014
13,702
Hello again,

Yes, with that very very nice drawing (very nice) it makes it a lot easier.

The transfer function is:
Vout(s)=Vin*(s*TP+c*s+1)/((s+1)*(c*s+1)*KP)

and in slightly different form for easier transforming:
Vout(s)=s*Vin*TP/((s+1)*(c*s+1)*KP)+Vin/((s+1)*KP)

where in your drawing c=0.01 so you can change that if you like.
TP=tP in your drawing also.

The time function for step input is:
Vout(t)=Vin/KP+(e^(-t/c)*Vin*TP)/((c-1)*KP)-(e^(-t)*(Vin*TP+(c-1)*Vin))/((c-1)*KP)

The difference between having a true derivative there vs having your high pass filter with a unit step input is such that:
1. The true derivative function pops up to around 3/8 of the input almost immediately, while the function with the high pass filter ramps up in about 50ms, but that 50ms looks relatively insignificant compared to the entire response. So in short it looks good, if that's what you were after. You may need a little gain as the final stage like 1.05 if you really want to get closer to the final value, but you can check that too.
2. The overall response is the same but the final value may be a little different, about 5 percent lower. It may be possible to adjust 'c' for the same exact final value.

Much nicer drawing this time. Congrats on that.
 
Last edited:

Thread Starter

Abdul Wali

Joined Mar 19, 2016
35
Hello again,

Yes, with that very very nice drawing (very nice) it makes it a lot easier.

The transfer function is:
Vout(s)=Vin*(s*TP+c*s+1)/((s+1)*(c*s+1)*KP)

and in slightly different form for easier transforming:
Vout(s)=s*Vin*TP/((s+1)*(c*s+1)*KP)+Vin/((s+1)*KP)

where in your drawing c=0.01 so you can change that if you like.
TP=tP in your drawing also.

The time function for step input is:
Vout(t)=Vin/KP+(e^(-t/c)*Vin*TP)/((c-1)*KP)-(e^(-t)*(Vin*TP+(c-1)*Vin))/((c-1)*KP)

The difference between having a true derivative there vs having your high pass filter with a unit step input is such that:
1. The true derivative function pops up to around 3/8 of the input almost immediately, while the function with the high pass filter ramps up in about 50ms, but that 50ms looks relatively insignificant compared to the entire response. So in short it looks good, if that's what you were after. You may need a little gain as the final stage like 1.05 if you really want to get closer to the final value, but you can check that too.
2. The overall response is the same but the final value may be a little different, about 5 percent lower. It may be possible to adjust 'c' for the same exact final value.

Much nicer drawing this time. Congrats on that.
@MrAl Thanks, Now there is one problem:
this is the controller when i connect this controller to the ac motor in Simulink where the Vin is just a pulse generator square wave form and i check the bode plot, i see that the system is stable from bode plot but when i write the controller equation same as u sent above in the Matlab command window and i multiply this transfer function with the motor transfer function (k/ts^2+s) and draw the bode plot i see from the bode plot that the system is unstable.. for both transfer functions i choose k=0.4, t=2.7763, the value of c for controller is 0.01 but i don't take the Vin in the transfer function.
 

MrAl

Joined Jun 17, 2014
13,702
Hello again,

Well again i cant follow your logic without seeing the entire system. But let me try to guess at what you are doing again...

You are using a motor with function k/(t*s^2+s) where k=0.4 and t=2.7763, but are you using that value of 't' for anything else? In your block diagram you have TP=0.1 right?

You have the system with the derivative block, and when you connect that, the system is stable.
But when you substitute the derivative block with the high pass filter, the system becomes unstable.
Is this true?

But then why are you using a pulse generator on the input of the system?
What is the switching frequency?

What else does not make sense yet is how you can take a feed forward system that is stable and connect a load that is stable and the result is an unstable system when there is no additional feedback. To understand this i would have to see the whole system. What are you using for the pulse generator and what is the frequency and what is the duty cycle range?

Also, what do you mean when you say, "I dont take the Vin in the transfer function" ?

Again, for these systems as well as any circuit we have to have all the details in order to figure out what exactly is happening.

In the mean time, i'll try 'connecting' the motor to the output of the system and see what happens myself.

WHen you say the motor transfer function is (i assume0 k/(t*s^2+s) is that with a step input or no input yet?
I ask because that looks like it has a step input already and that could be a problem as that would make the real motor transfer function k/(s+1) which looks more like a real motor. A real motor always has a constant term in the denominator such as K=KM*KT as in (s^2+A*s+K) it never has just (s^2+K*s). So it could be possible you are just using the wrong transfer function for the motor. But again, seeing the whole thing would be better.

Also, it may be possible to estimate the derivative block a little better, but it would take more filtering. Not sure if you want to go there or not.
 

MrAl

Joined Jun 17, 2014
13,702
Hello again,

Well again i cant follow your logic without seeing the entire system. But let me try to guess at what you are doing again...

You are using a motor with function k/(t*s^2+s) where k=0.4 and t=2.7763, but are you using that value of 't' for anything else? In your block diagram you have TP=0.1 right?

You have the system with the derivative block, and when you connect that, the system is stable.
But when you substitute the derivative block with the high pass filter, the system becomes unstable.
Is this true?

But then why are you using a pulse generator on the input of the system?
What is the switching frequency?

What else does not make sense yet is how you can take a feed forward system that is stable and connect a load that is stable and the result is an unstable system when there is no additional feedback. To understand this i would have to see the whole system. What are you using for the pulse generator and what is the frequency and what is the duty cycle range?

Also, what do you mean when you say, "I dont take the Vin in the transfer function" ?

Again, for these systems as well as any circuit we have to have all the details in order to figure out what exactly is happening.

In the mean time, i'll try 'connecting' the motor to the output of the system and see what happens myself.

WHen you say the motor transfer function is (i assume0 k/(t*s^2+s) is that with a step input or no input yet?
I ask because that looks like it has a step input already and that could be a problem as that would make the real motor transfer function k/(s+1) which looks more like a real motor. A real motor always has a constant term in the denominator such as K=KM*KT as in (s^2+A*s+K) it never has just (s^2+K*s). So it could be possible you are just using the wrong transfer function for the motor. But again, seeing the whole thing would be better.

Also, it may be possible to estimate the derivative block a little better, but it would take more filtering. Not sure if you want to go there or not.

Hi,

I tested it with the motor function you provided and i dont see any instability so you'll have to show me how you determined it was unstable and what exactly you did to show this. I would have to follow your logic exactly to see what you are seeing.
 

Thread Starter

Abdul Wali

Joined Mar 19, 2016
35
Hello again,

Well again i cant follow your logic without seeing the entire system. But let me try to guess at what you are doing again...

You are using a motor with function k/(t*s^2+s) where k=0.4 and t=2.7763, but are you using that value of 't' for anything else? In your block diagram you have TP=0.1 right?

You have the system with the derivative block, and when you connect that, the system is stable.
But when you substitute the derivative block with the high pass filter, the system becomes unstable.
Is this true?

But then why are you using a pulse generator on the input of the system?
What is the switching frequency?

What else does not make sense yet is how you can take a feed forward system that is stable and connect a load that is stable and the result is an unstable system when there is no additional feedback. To understand this i would have to see the whole system. What are you using for the pulse generator and what is the frequency and what is the duty cycle range?

Also, what do you mean when you say, "I dont take the Vin in the transfer function" ?

Again, for these systems as well as any circuit we have to have all the details in order to figure out what exactly is happening.

In the mean time, i'll try 'connecting' the motor to the output of the system and see what happens myself.

WHen you say the motor transfer function is (i assume0 k/(t*s^2+s) is that with a step input or no input yet?
I ask because that looks like it has a step input already and that could be a problem as that would make the real motor transfer function k/(s+1) which looks more like a real motor. A real motor always has a constant term in the denominator such as K=KM*KT as in (s^2+A*s+K) it never has just (s^2+K*s). So it could be possible you are just using the wrong transfer function for the motor. But again, seeing the whole thing would be better.

Also, it may be possible to estimate the derivative block a little better, but it would take more filtering. Not sure if you want to go there or not.
@MrAl Thanks for your help again, BTW the filter that we are talking about this is a high pass filter, right? and is it an analogue filter or digital filter? there are many types of filter active, passive etc. i want to know that this is actually what type of filter?
 

MrAl

Joined Jun 17, 2014
13,702
@MrAl Thanks for your help again, BTW the filter that we are talking about this is a high pass filter, right? and is it an analogue filter or digital filter? there are many types of filter active, passive etc. i want to know that this is actually what type of filter?

Hi,

I was assuming you were using an analog high pass filter such as a capacitor in series with a resistor and followed by a gain stage:
(s*RC)/(s*RC+1)*G

as that is what you implied with your newer block diagram.
 

Thread Starter

Abdul Wali

Joined Mar 19, 2016
35
@MrAl HI, Just for general knowledge, in case if i want to select the fc for this filter so which of the following two concepts is correct?
1) check the value of the lowest decade cutoff frequency and then increase or move the corner frequency out until the noise is removed
2) check at the value of the highest cutoff frequency and reduce the frequency until the noise is removed

By these two questions, i actually want to know that is the first priority given to the smaller cutoff frequency of the filter or highest? in other words generally is it better to have smaller cutoff frequency or higher cutoff frequency??

what i understand from the following equation is that its always better to have higher cutoff frequency because the higher fc is the lower RC value will be (fc=1/2(pi)RC)
 

MrAl

Joined Jun 17, 2014
13,702
Hi,

Higher generally means faster response. Lower slower response but better noise removal. It's a tradeoff.
 
Top