.PS gen_init linewid = linewid*0.8 circlerad = 0.35/2 bw = boxwid/2 bh = boxht/2 # Gimbal.m4 # https://tex.stackexchange.com/questions/734796/how-to-create-a-gimbal-model-for-one-axis-using-tikz #gen_init iflatex(command "{\sf \newcommand{\Sub}[1]{{\hbox{\scriptsize `#1'}}}") Gimbal: [ textht = 15bp__ circlerad = 8bp__ Ir: arrow right_ linewid*3/2 { "Current" ljust at Ir.start+(-5bp__,textht) "reference" ljust "$i_\Sub{reference}$" ljust at Ir.start-(0,textht*2/3) } Ka: box "$K_a$" { "Current" at Ka.s -(0,textht) "amplifier gain" } arrow right_ linewid*3/2 { "Motor" at last arrow+(0,textht) "current" } Kt: box "$K_t$" { "Motor torque" at Kt.s -(0,textht) "constant" } arrow S1: circle; {"$-$" at S1.n above ljust; "$+$" at S1.w above rjust } arrow right_ linewid*1.2 GI: box "$\frac{1}{J_\Sub{s}}$"; arrow "$\omega_h$" above { "Gimbal inertia" at GI.s -(0,textht) } S2: circle at Here+(0,3/2*boxht) {"$-$" at S2.e above ljust; "$+$" at S2.s below rjust } { arrow <- right_; "$\omega_b$" above rjust } arrow left_ from S2.w to (GI.e,S2) Bv: box "$B_v$" arrow left_ "$T_\Sub{viscous}\mathstrut$" below from Bv.w to (S1.e,Bv) S3: circle "$+$" { arrow <- from S3.w; "$T_\Sub{ext}$" above ljust } arrow from S3 to S1 chop Fc: box ht boxht*3/2 at Bv+(0,boxht*7/4) arrow from Fc.w to (S3,Fc) then to S3.n "$T_\Sub{friction}$" at (S3,Fc) above [ Orig: Here; thicktmp = linethick; thicklines_(0.4) V: arrow from Orig up_ Fc.ht*5/12 H: arrow right_ Fc.wid*5/6 with .c at Orig; thicklines_(thicktmp) line thick 1.2 up Fc.ht/2 with .c at Orig spline 0.55 thick 1.2 down_ boxht/5 right_ boxht/9 \ then right_ boxwid/9 then right_ boxwid/4 up_ boxwid/8 { "$F_c$" above rjust } spline 0.55 thick 1.2 from last line.start up_ boxht/5 left_ boxht/9 \ then left_ boxwid/9 then left_ boxwid/4 down_ boxwid/8 { "${-}F_c$" below ljust } ] with .Orig at Fc Gl: box wid boxwid*5/4 with .e at GI.e+(0,-boxht*2) \ "$\frac{\omega_g^2}{s^2+2\zeta \omega_g s + \omega_g^2}$ " { "Gyro lowpass" at Gl.s -(0,textht) } arrow from Gl.e to (S2,Gl) then to S2.s Gd: box wid boxwid*5/3 at (Kt,Gl) \ "$\frac{(d^2/12)\,s^2 - (d/2)\,s + 1}{(d^2/12)\,s^2 + (d/2)\,s + 1}$" { "Gyro delay" at Gd.s -(0,textht) } arrow left_ from Gl.w to Gd.e arrow left_ from Gd.w chop 0 chop S4: circle "$+$" {"Gyro noise" at (S4,last ""); arrow from last "".n to S4.s } Rm: arrow left_ from S4.w to (Ir.start,S4) { "Rate" ljust at Here+(0,textht) "measurement" ljust } "$w{}_\Sub{measured}$" ljust at Here-(0,textht*2/3) ] # "Single-axis gimbal model" below ljust at Gimbal.sw+(0,-5pt__) iflatex(command "}%") .PE