C_R

1461 Reputation

19 Badges

4 years, 9 days

MaplePrimes Activity


These are questions asked by C_R

[6600.0*theta(q)-17000.0*theta(q-1)+14400.0*theta(q-2)-4000.0*theta(q-3) = v(q)-.20*theta(q)+.20*theta(q-1)]

[6600.0*theta(q)-17000.0*theta(q-1)+14400.0*theta(q-2)-4000.0*theta(q-3) = v(q)-.20*theta(q)+.20*theta(q-1)]

(1)

isolate([6600.0*theta(q)-17000.0*theta(q-1)+14400.0*theta(q-2)-4000.0*theta(q-3) = v(q)-.20*theta(q)+.20*theta(q-1)], theta(q))

Error, (in isolate) invalid arguments for isolate

 

solve([6600.0*theta(q)-17000.0*theta(q-1)+14400.0*theta(q-2)-4000.0*theta(q-3) = v(q)-.20*theta(q)+.20*theta(q-1)], theta(q))[]

theta(q) = 0.1515105603e-3*v(q)+2.575709827*theta(q-1)-2.181752068*theta(q-2)+.6060422411*theta(q-3)

(2)

It works for h(x)  in help(isolate)


Download no_isolation.mw

Is it even possible to use a replacement list as attempted below to convert a z-transform to a finite difference expression?

z-transformed impulse response (`sampletime = 1/20`)

(10*exp(3/10)-7*exp(1/5)-3*exp(2/5))*exp(1/10)*U(z)/z+(exp(1/10)*(-3+10*exp(1/10)-7*exp(1/5))-(10*exp(3/10)-7*exp(1/5)-3*exp(2/5))*exp(1/10))*U(z)/z^2-(-3+10*exp(1/10)-7*exp(1/5))*exp(1/10)*U(z)/z^3 = 8*Y(z)*exp(1/10)*exp(3/10)*exp(1/5)+(8*((-exp(1/5)-exp(3/10))*exp(1/10)-exp(3/10)*exp(1/5)))*Y(z)/z+(8*(exp(1/10)+exp(1/5)+exp(3/10)))*Y(z)/z^2-8*Y(z)/z^3

(10*exp(3/10)-7*exp(1/5)-3*exp(2/5))*exp(1/10)*U(z)/z+(exp(1/10)*(-3+10*exp(1/10)-7*exp(1/5))-(10*exp(3/10)-7*exp(1/5)-3*exp(2/5))*exp(1/10))*U(z)/z^2-(-3+10*exp(1/10)-7*exp(1/5))*exp(1/10)*U(z)/z^3 = 8*Y(z)*exp(1/10)*exp(3/10)*exp(1/5)+8*((-exp(1/5)-exp(3/10))*exp(1/10)-exp(3/10)*exp(1/5))*Y(z)/z+8*(exp(1/10)+exp(1/5)+exp(3/10))*Y(z)/z^2-8*Y(z)/z^3

(1)

deg_mx := 3

3

(2)

Replacements to get finite difference equation

[seq(U(z)/z^i = U[q+1-i], i = deg_mx .. 0, -1), seq(Y(z)/z^i = Y[q+1-i], i = deg_mx .. 0, -1)]

[U(z)/z^3 = U[q-2], U(z)/z^2 = U[q-1], U(z)/z = U[q], U(z) = U[q+1], Y(z)/z^3 = Y[q-2], Y(z)/z^2 = Y[q-1], Y(z)/z = Y[q], Y(z) = Y[q+1]]

(3)

Attempt to replace

algsubs([U(z)/z^3 = U[q-2], U(z)/z^2 = U[q-1], U(z)/z = U[q], U(z) = U[q+1], Y(z)/z^3 = Y[q-2], Y(z)/z^2 = Y[q-1], Y(z)/z = Y[q], Y(z) = Y[q+1]][1], (10*exp(3/10)-7*exp(1/5)-3*exp(2/5))*exp(1/10)*U(z)/z+(exp(1/10)*(-3+10*exp(1/10)-7*exp(1/5))-(10*exp(3/10)-7*exp(1/5)-3*exp(2/5))*exp(1/10))*U(z)/z^2-(-3+10*exp(1/10)-7*exp(1/5))*exp(1/10)*U(z)/z^3 = 8*Y(z)*exp(1/10)*exp(3/10)*exp(1/5)+8*((-exp(1/5)-exp(3/10))*exp(1/10)-exp(3/10)*exp(1/5))*Y(z)/z+8*(exp(1/10)+exp(1/5)+exp(3/10))*Y(z)/z^2-8*Y(z)/z^3)

Error, (in algsubs) cannot compute degree of pattern in z

 

NULL

Download replace_Y_of_z_by_Y_of_q.mw

I was not able to apply ICs (initial conditions) using the advanced parameter settings of the flexible beam component in the attached file. My intention is to have a beam moving at t=0s (velocity of end frame <> 0). The computed initial values for the elastic coordinates (see output console for the disabled component below encircled in red) indicate that the flexible beam has no kinetic energy at t=0s.

A workaround is to attach a rigid body to the end frame and apply the ICs to the body. (Inertia and mass of the rigid body can be set to zero.)

How to apply initial conditions to the disabled component so that it moves as the workaround?

Imposing_IC_v.msim

Ideally, I would like to find all roots of this RootOf expression for a given interval.

I tried defining a function from the argument of the RootOf expression and using fsolve to find solutions, but could not get all of them.

What I managed to do skips the interval, is not really elegant and raises additional questions.
I would be grateful for any hints and improvements.

RootOf(_Z*cos(_Z)-sqrt(sin(_Z)^2))

RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))

(1)

allvalues(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2)))

Error, (in RootOf/sort1) cannot numerically evaluate the argument

 

RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), index = i)

RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2), index = i)

(2)

evalf(subs(i = 3, RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2), index = i)))

RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2), index = 3)

(3)

evalf(RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 3))

-4.493409458

(4)

rt := ''RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), i)''

'RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), i)'

(5)

subs(i = 3, rt)

RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 3)

(6)

evalf(RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 3))

-4.493409458

(7)

seq(subs(i = k, rt), k = 1 .. 5)

RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 1), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 2), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 3), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 4), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 5)

(8)

evalf(%)

0., 0., -4.493409458, 4.913180439, 4.913180439

(9)

{-4.493409458, 0., 4.913180439}[]

-4.493409458, 0., 4.913180439

(10)

seq(evalf(subs(i = k, rt)), k = 1 .. 5)

Error, (in evalf/RootOf) numeric exception: division by zero

 

evalf(seq(subs(i = k, rt), k = 1 .. 5))

Error, (in evalf/RootOf) numeric exception: division by zero

 

NULL

seq(subs(i = k, rt), k = -5 .. 5)

RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), -5), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), -4), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), -3), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), -2), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), -1), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 0), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 1), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 2), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 3), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 4), RootOf(op(RootOf(_Z*cos(_Z)-(sin(_Z)^2)^(1/2))), 5)

(11)

evalf(%)

-4.493409458, -4.493409458, -2.028757845, -2.028757838, 4.913180439, 0., 0., 0., -4.493409458, 4.913180439, 4.913180439

(12)

NULL

NULL

Download RootOf_a_periodic_function.mw

I cannot. If I right click on the warning I get only a copy option

Double_Pendulum_warning.msim

2 3 4 5 6 7 8 Last Page 4 of 18