kekon
Full Member level 3
- Joined
- Sep 19, 2002
- Messages
- 155
- Helped
- 5
- Reputation
- 10
- Reaction score
- 3
- Trophy points
- 1,298
- Location
- Poland, Białystok
- Activity points
- 1,493
Code C# - [expand] 1 2 3 4 5 6 7 8 9 10 double InputValue = 2048; double OutputValue; for (int i = 0; i < 20; i++) { OutputValue = InputValue * b0 + Reg1 * b1 + a1 * Reg2; Reg1 = InputValue; Reg2 = OutputValue; Console.WriteLine(OutputValue.ToString()); }
To be precise, it reaches the input DC value after 3 ms in your case.With this analog low pass filter the output value achievies the input value after some time when constant voltage is applied to it
I might be wrong but I think it should be "-a1*Reg2" and not "+a1*Reg2"
- - - Updated - - -
To be precise, it reaches the input DC value after 3 ms in your case.
Obviously wrong.Why 10^-44 ?
Obviously wrong.
I get b0=b1=0.0244 and a1=-0.9512 for 20 kHz and bilinear transformation. Or use simpler step invariant transformation which shifts the output by a half sampling period; b0=0.0488, same a1.
Consider that ∑-an + ∑bn must be 1 for unity DC gain.
What's your plan for the rest of the control loop?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?