Message Boards Message Boards

0
|
5109 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to improve numerical calculation accuracy?

Posted 4 years ago

Dear All,

I'm facing a numerical calculation error. Here is the problem: The transfer function got at the numerator the term exp^(-t0*s). Actually there are 5 of it. Please note t0=0.05 (sec). The Transfer function is quite heavy so the calculation result is wrong. If for instance I set t0=0.0005 then the numerical solution is correct and so the Bode plot. I'd need to solve the problem by using t0=0.05 though. This is the actual time delay when the road input hit the front & rear wheel. Can anyone of you help on this matter? I have tried to use the write the exp when Taylor polynomial but is not improving the thing. Actually is worse.

Attachment

Attachment

POSTED BY: Cosimo PRUSCIANO
4 Replies

Dear Daniel, Thanks for your reply. I sorted out the issue. If you write the exponential (exp) by means of Taylor's polynomial you can see what the max n tern which suit you. The max n term to be chosen for Taylor's poly must be the one by which the grade of the polynomial at numerator of the transfer function is lower than the one at the denominator. That's the key to plot Bode plot properly. In my case n=2. In this way, at the numerator the grade of the poly is 7. At denominator I got 8. So by n=2 the system is stable and Bode plot looks good. See below. Please advise and give me your feeback. Regards,

tay = Normal[Series[Exp[-T*s], {s, 0, 2}]]

Zbody2 = (1 (kf kft kr krt lf lr + kf kft kr krt lr^2 + 
      tay (kf kft kr krt lf^2 + 
         kf kft kr krt lf lr) + (cr kf kft krt lf lr + 
         cf kft kr krt lf lr + cr kf kft krt lr^2 + 
         cf kft kr krt lr^2 + 
         tay (cr kf kft krt lf^2 + cf kft kr krt lf^2 + 
            cr kf kft krt lf lr + 
            cf kft kr krt lf lr)) s + (Jyy kf kft kr + 
         Jyy kf kft krt + cf cr kft krt lf lr + cf cr kft krt lr^2 + 
         tay (Jyy kf kr krt + Jyy kft kr krt + cf cr kft krt lf^2 + 
            cf cr kft krt lf lr + kf kr krt lf^2 mf + 
            kf kr krt lf lr mf) + kf kft kr lf lr mr + 
         kf kft kr lr^2 mr) s^2 + (cr Jyy kf kft + cf Jyy kft kr + 
         cf Jyy kft krt + 
         tay (cr Jyy kf krt + cr Jyy kft krt + cf Jyy kr krt + 
            cr kf krt lf^2 mf + cf kr krt lf^2 mf + 
            cr kf krt lf lr mf + cf kr krt lf lr mf) + 
         cr kf kft lf lr mr + cf kft kr lf lr mr + cr kf kft lr^2 mr +
          cf kft kr lr^2 mr) s^3 + (cf cr Jyy kft + 
         tay (cf cr Jyy krt + Jyy kr krt mf + cf cr krt lf^2 mf + 
            cf cr krt lf lr mf) + Jyy kf kft mr + cf cr kft lf lr mr +
          cf cr kft lr^2 mr) s^4 + (cr tay Jyy krt mf + 
         cf Jyy kft mr) s^5))/(kf kft kr krt (lf + 
       lr)^2 + (cr kf kft krt (lf + lr)^2 + 
       cf kft kr krt (lf + lr)^2) s + (Jyy kf kr krt + 
       Jyy kft kr krt + cf cr kft krt (lf + lr)^2 + 
       kft kr krt lr^2 m + kf kft krt (Jyy + lf^2 m) + 
       kf kr krt (lf^2 mf + 2 lf lr mf + lr^2 (m + mf)) + 
       kf kft kr (Jyy + 2 lf lr mr + lr^2 mr + 
          lf^2 (m + mr))) s^2 + (cr Jyy kf krt + cr Jyy kft krt + 
       cf Jyy kr krt + cr kft krt lr^2 m + cf kft krt (Jyy + lf^2 m) +
        cr kf krt (lf^2 mf + 2 lf lr mf + lr^2 (m + mf)) + 
       cf kr krt (lf^2 mf + 2 lf lr mf + lr^2 (m + mf)) + 
       cr kf kft (Jyy + 2 lf lr mr + lr^2 mr + lf^2 (m + mr)) + 
       cf kft kr (Jyy + 2 lf lr mr + lr^2 mr + 
          lf^2 (m + mr))) s^3 + (cf cr Jyy krt + Jyy kft krt m + 
       Jyy kr krt mf + kf krt lf^2 m mf + kr krt lr^2 m mf + 
       Jyy kf krt (m + mf) + 
       cf cr krt (lf^2 mf + 2 lf lr mf + lr^2 (m + mf)) + 
       kft kr lr^2 m mr + kf kft (Jyy + lf^2 m) mr + 
       Jyy kft kr (m + mr) + Jyy kf kr (m + mf + mr) + 
       cf cr kft (Jyy + 2 lf lr mr + lr^2 mr + lf^2 (m + mr)) + 
       kf kr (2 lf lr mf mr + lr^2 (m + mf) mr + 
          lf^2 mf (m + mr))) s^4 + (cr Jyy krt mf + cf krt lf^2 m mf +
        cr krt lr^2 m mf + cf Jyy krt (m + mf) + cr kft lr^2 m mr + 
       cf kft (Jyy + lf^2 m) mr + cr Jyy kft (m + mr) + 
       cr Jyy kf (m + mf + mr) + cf Jyy kr (m + mf + mr) + 
       cr kf (2 lf lr mf mr + lr^2 (m + mf) mr + lf^2 mf (m + mr)) + 
       cf kr (2 lf lr mf mr + lr^2 (m + mf) mr + 
          lf^2 mf (m + mr))) s^5 + (Jyy krt m mf + Jyy kft m mr + 
       kf lf^2 m mf mr + kr lr^2 m mf mr + Jyy kf (m + mf) mr + 
       Jyy kr mf (m + mr) + cf cr Jyy (m + mf + mr) + 
       cf cr (2 lf lr mf mr + lr^2 (m + mf) mr + 
          lf^2 mf (m + mr))) s^6 + (cf lf^2 m mf mr + 
       cr lr^2 m mf mr + cf Jyy (m + mf) mr + 
       cr Jyy mf (m + mr)) s^7 + Jyy m mf mr s^8)


(2.14627*10^22 + 2.55191*10^20 s + 2.67558*10^19 s^2 + 
 4.25213*10^17 s^3 + 7.93216*10^15 s^4 + 3.27433*10^14 s^5 + 
 2.43854*10^12 s^6 + 2.42798*10^10 s^7) / (
2.14627*10^22 + 7.91759*10^20 s + 1.0021*10^20 s^2 + 
 2.37024*10^18 s^3 + 1.01491*10^17 s^4 + 1.37044*10^15 s^5 + 
 1.92069*10^13 s^6 + 1.09906*10^11 s^7 + 6.56832*10^8 s^8)

sys2 = TransferFunctionModel[Zbody2, s] /. T -> 0.05 // N
POSTED BY: Cosimo PRUSCIANO

Please post code in copy/pastable format.

POSTED BY: Daniel Lichtblau

Hi,

The coefficients are correct I guess. Can you please make an example?

POSTED BY: Cosimo PRUSCIANO

You can try working with exact coefficients as long as possible.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract