Calculating Vx and Vy given V, X, Y

  • Thread starter Darkbound
  • Start date
  • Tags
    Kinematics
In summary: So the velocity is changing. So I need to find the velocity at any given time, that is a constant, but the ratios between Vx and Vy would change, that's what I am saying.No it will not give a constant velocity, that is precisely what i am saying, the velocities along each respecitve axis... so the radius of the spiral is changing. So the velocity is changing. So I need to find the velocity at any given time, that is a constant, but the ratios between Vx and Vy would change, that's what I am saying.In summary, the goal is to maintain a constant speed (0.5 m/s) throughout a two-dimensional trajectory described
  • #1
Darkbound
22
0
Homework Statement
Calculating Vx and Vy ratio to always have a constant given V
Relevant Equations
x(t) = x0 + v0 * cos(alpha) * t
y(t) = y0 + v0 * sin(alpha) * t
I have a problem where I am given a trajectory by x(t), y(t) and I am given a constant speed throught the whole trajectory. I need to find vx and vy.
Equations that I am given:
x(t) = 1.5 + 0.5 * t * cos(8*pi*t)
y(t) = 1.5 + 0.5 * t * sin(8*pi*t)
v0 = 0.5

What I have tried to do is use the 1D constant acceleration equations to figure out what the angle of the velocity is:
x(t) = x0 + v0 * cos(alpha) * t

Then I equalized the two x(t) equations:
x0 + v0 * cos(alpha) * t = 1.5 + 0.5 * t * cos (8 * pi * t)

From here, alpha:
alpha = arccos(1.5/(v0*t) + (0.5*cos(8 * pi * t))/v0 - x0/(v0 * t)

I am assuming that x0 in the equation is a given point calculated by my initial x(t) equation
I have tried to calculate the angle with MATLAB:

t = 0:0.001:1;
x0 = 1.5 + 0.5 .* t.* cos(8 .* pi .* t);
y0 = 1.5 + 0.5 .* t.* sin(8 .* pi .* t);
v0 = 0.5;

for n = 1:size(t, 2)
alpha(n) = acos(1.5/(v0*t(n)) + 0.5 * cos(8*pi*t(n))/v0 - x0(n)/(v0*t(n)));
end

From here I am calculating:
vx = v0 * cos(alpha)
vy = v0 * sin(alpha)

And vx is always 0, vy is always 0.5 and that is because all I get for the angle is 90 degrees at all times. I am assuming that either the way I calculate it within the loop is wrong, or my approach to the equations themselves is wrong, but I can't figure out exactly where my problem is.

Again, what I want is to find how Vx and Vy change while the point moves through the given trajectory, it must always move at a constant velocity, the only thing that is changing is the ratio between Vx and Vy to maintain that velocity, 0.5 = sqrt(vx^2 + vy^2) that should be true at all times.
 
Physics news on Phys.org
  • #2
As an alternative approach: how is velocity related to position?
 
  • #3
Velocity is the first derivative of the position... So I should take the first derivatives of the equations of the trajectory that I have and then do 0.5^2 = derivative(x)^2 + derivative(y)^2 and that will be an equation with t as unknown in it solve for t and then plug t's back into the derivatives to get the actual velocities?
 
  • #4
Darkbound said:
Velocity is the first derivative of the position... So I should take the first derivatives of the equations of the trajectory that I have and then do 0.5^2 = derivative(x)^2 + derivative(y)^2 and that will be an equation with t as unknown in it solve for t and then plug t's back into the derivatives to get the actual velocities?

This problem is unclear to me. First, are your equations:

##x(t) = x_0 + v_0 \cos(\alpha t)##

or

##x(t) = x_0 + v_0 (\cos(\alpha))t##

In both cases these represent motion at constant speed. Is the problem to show this? Can you describe the motion in each case?
 
  • #5
Ok I will try to expain it again. The motion is two (actually three dimensional, but for simplicity I am keeping it to 2 for now). I have x and y equations, these are the first equations that I wrote in my post, the second x, y equations I've taken from the 1D constant acceleration equations, but without acceleration.
The goal is to maintain a constant speed throughout the whole trajectory, let's say that this is 0.5 m/s.
Now if the motion is along the x-axis only or along the y-axis only, that's simple, but with the equations that I have, the motion is along both axes and that's a spiral. So Vx and Vy are different at any given moment in time, but they should always be equal to a total speed of 0.5m/s. I need to find these ratios, I need to output the graphs of Vx and Vy versus t, that's my end goal. So V versus t should be a constant, 0.5 at any given moment in time, but Vx and Vy are changing, they always end up at V = 0.5 but the ratio changes between them would change.
 
  • #6
Darkbound said:
Ok I will try to expain it again. The motion is two (actually three dimensional, but for simplicity I am keeping it to 2 for now). I have x and y equations, these are the first equations that I wrote in my post, the second x, y equations I've taken from the 1D constant acceleration equations, but without acceleration.
The goal is to maintain a constant speed throughout the whole trajectory, let's say that this is 0.5 m/s.
Now if the motion is along the x-axis only or along the y-axis only, that's simple, but with the equations that I have, the motion is along both axes and that's a spiral. So Vx and Vy are different at any given moment in time, but they should always be equal to a total speed of 0.5m/s. I need to find these ratios, I need to output the graphs of Vx and Vy versus t, that's my end goal. So V versus t should be a constant, 0.5 at any given moment in time, but Vx and Vy are changing, they always end up at V = 0.5 but the ratio changes between them would change.
That's where the properties of the sine and cosine come in useful.

On the other hand, what is wrong with simply keeping ##v_x## and ##v_y## constant?
 
  • #7
Is that even possible? If vx is let's say 0.1 m/s and vy 0.4 m/s at all times, wouldn't that make the trajectory simply a line?
 
Last edited:
  • #8
Darkbound said:
Relevant Equations: x(t) = x0 + v0 * cos(alpha) * t
y(t) = y0 + v0 * sin(alpha) * t

x(t) = 1.5 + 0.5 * t * cos(8*pi*t)
y(t) = 1.5 + 0.5 * t * sin(8*pi*t)
So ##\alpha## is a function of time, right? Specifically, ##\alpha(t)=8\pi t##? But there is no way that will give a constant velocity, so you must have "given equations" wrong.
 
  • #9
No it will not give a constant velocity, that is precisely what i am saying, the velocities along each respecitve axis are NOT constant, but when you use each of these individual velocities to calculate the total speed, the total speed should be constant at all times, so at a given moment in time vx may be larger than vy, but in the end its still 0.5, then in another moment in time, vy may be larger than vx, but its still a total speed of 0.5. You are looking at just one of the equations and not at both of them.
 
  • #10
Darkbound said:
No it will not give a constant velocity, that is precisely what i am saying, the velocities along each respecitve axis are NOT constant, but when you use each of these individual velocities to calculate the total speed, the total speed should be constant at all times, so at a given moment in time vx may be larger than vy, but in the end its still 0.5, then in another moment in time, vy may be larger than vx, but its still a total speed of 0.5. You are looking at just one of the equations and not at both of them.
Sorry, I meant it will not give you a constant speed.
 
  • #11
Im sorry, either I don't understand you, or you don't understand me.
Lets say we have a vector V that is the our desired speed of the point when it moves through the given trajectory (regardless of what the trajectory is). This vector has 2 components, Vx and Vy. There are infinite amount of combinations between Vx and Vy that will always give the desired length of the vector V (the length of that vector is our desired speed). I need to find exactly what these combinations are for my trajectory (or any other trajectory), such that, when we use these combinations to calculate the length of V, its always 0.5
 
  • #12
I have attached an image to this post, I hope that this clarifies what I mean. I need to find vx and vy such that they always make the same v vector, as you can see, the vector always has the same length, but vx and vy can change in different moments of time
 

Attachments

  • 62052419_467709997367336_1912938919939276800_n.jpg
    62052419_467709997367336_1912938919939276800_n.jpg
    73.9 KB · Views: 586
  • #13
Darkbound said:
Im sorry, either I don't understand you, or you don't understand me.
Lets say we have a vector V that is the our desired speed of the point when it moves through the given trajectory (regardless of what the trajectory is). This vector has 2 components, Vx and Vy. There are infinite amount of combinations between Vx and Vy that will always give the desired length of the vector V (the length of that vector is our desired speed). I need to find exactly what these combinations are for my trajectory (or any other trajectory), such that, when we use these combinations to calculate the length of V, its always 0.5
You give the position coordinates as ##x=x_0+ct\cos(\omega t)## and ##y=y_0+ct\sin(\omega t)##, where c and ω are constants.
That leads to ##\dot x= c\sin(\omega t)+ct\omega\cos(\omega t)## and ##\dot y= c\cos(\omega t)-ct\omega\sin(\omega t)##.
Hence ##v^2=c^2 +c^2t^2\omega^2##.
How is that going to be constant?

I see two possibilities:
Someone has incorrectly specified the coordinate equations, or
The 't' in the coordinate equations is just an arbitrary parameter, not time.
 
  • #14
Yes, that's what I was thinking about now, t is not time its a parameter, I was using it to calculate each of the points of the motion, so its not actual time.
 
  • #15
Darkbound said:
Yes, that's what I was thinking about now, t is not time its a parameter, I was using it to calculate each of the points of the motion, so its not actual time.
Ok, so rewrite my algebra in post #13 on that basis.

Edit: but to avoid confusion, maybe use a different label for the parameter.
 
  • #16
The equations of a conical helix (what I am trying to use as my trajectory) are
x = t*cos(c*t)
y = t*sin(c*t)
z = t
(taken from here http://www.mathematische-basteleien.de/spiral.htm)
Where c is a constant
In my calculations I was simply creating t as a vector of values from 0 to 1 and using it to calculate the x y z values. The derivatives of these equations would yield the same result as yours, I don't know what I am missing, or what is wrong in my formulation of the problem.
 
  • #17
Darkbound said:
The equations of a conical helix (what I am trying to use as my trajectory) are
x = t*cos(c*t)
y = t*sin(c*t)
z = t
(taken from here http://www.mathematische-basteleien.de/spiral.htm)
Where c is a constant
In my calculations I was simply creating t as a vector of values from 0 to 1 and using it to calculate the x y z values. The derivatives of these equations would yield the same result as yours, I don't know what I am missing, or what is wrong in my formulation of the problem.
Please try to do as I asked in post #15. I suggest using z as the parameter instead of t, to avoid confusion with time.
 
  • #18
I don't want to mix the equations, they should not be dependent on each other (e.g. x on z or y on z or z on x), because I want to use the same approach for different sets of equations. If I take their derivatives as they currently are I will get the same result as yours
dx/dt = cos(c*t) - c*t*sin(c*t)
dy/dt = sin(c*t) + c*t*cos(c*t)
dz/dt = 1
And there are multiple problems here regarding my problem, first if vz is 1 then the total v can never be 0.5 Also the c*t* infront of the cos and sin will make them increase at all times (which is what I have already observed while attempting this)
I don't know what I am missing, or what is wrong in my formulation of the problem, or what is wrong in my equations, but these are the equations of a conical helix, it is certainly possible to go at a constant speed through the trajectory, through any trajectory, I just don't know what am I missing
 
  • #19
Darkbound said:
dx/dt = cos(c*t) - c*t*sin(c*t)
dy/dt = sin(c*t) + c*t*cos(c*t)
dz/dt = 1
This is the confusion you need to avoid. To end up with an expression for speed, the t you need in dx/dt is time, not the parameter t in the equations.
If you don't want to use z, pick something else. r, s, something.
 
  • #20
Darkbound said:
Yes, that's what I was thinking about now, t is not time its a parameter, I was using it to calculate each of the points of the motion, so its not actual time.

And how was anyone else supposed to know that?
 
  • #21
haruspex said:
This is the confusion you need to avoid. To end up with an expression for speed, the t you need in dx/dt is time, not the parameter t in the equations.
If you don't want to use z, pick something else. r, s, something.
I still don't understand what my equations should look like
 
  • #22
Darkbound said:
I still don't understand what my equations should look like
  1. Rewrite your equations for x and y in post #16 using u as the parameter instead of t.
  2. Differentiate them wrt to time, remembering that u varies with time.
  3. Obtain an expression for v2
  4. Solve the resulting differential equation.
 
  • #23
haruspex said:
  1. Rewrite your equations for x and y in post #16 using u as the parameter instead of t.
  2. Differentiate them wrt to time, remembering that u varies with time.
  3. Obtain an expression for v2
  4. Solve the resulting differential equation.

So, the equations should become like this:
x = u(t) * cos(c*u(t))
y = u(t) * sin(c*u(t))
z = u(t)

Is this correct?

And now I need another equation for u, which binds u that goes from 0 to 1 with respect to time, which can be from 0 to 10 (for example)? And time I will be calculating based on the speed that I want and the length of the trajectory, how do I make the u equation is my unknown at this point
 
Last edited:
  • #24
Darkbound said:
now I need another equation for u
No you don't. Just differentiate those equations to find the velocity components and hence the overall speed.
 
  • #25
haruspex said:
No you don't. Just differentiate those equations to find the velocity components and hence the overall speed.

I tried to do that and I ended up with an equation of the sort of du/dt * C = 0, it was a veeeeery long equation in the beginning but all sines/cosines etc got canceled in one way or another.
Where C is v/(sqrt(c+2)) if I recall correctly (I don't have the papers infront of me).
 
Last edited:
  • #26
Darkbound said:
I tried to do that and I ended up with an equation of the sort of du/dt * C = 0, it was a veeeeery long equation in the beginning but all sines/cosines etc got canceled in one way or another.
Where C is v/(sqrt(c+2)) if I recall correctly (I don't have the papers infront of me).
Then you made mistakes, but if you don't post your working I have no idea where.
Try just differentiating your first equation in post #23 with respect to time and post what you get.
 
  • #27
vx = du/dt * cos(c * u(t)) - u(t) * c * du/dt * sin(c * u(t))
vy = du/dt * sin(c * u(t)) + u(t) * c * du/dt * cos(c * u(t))
vz = du/dt
Then when I square them I am using the (a+-b)^2 formula to unwrap them for vx and vy
vx^2 = (du/dt)^2 * cos^2(c * u(t)) - 2*du/dt*cos(c * u(t))*u(t)*c*du/dt*sin(c * u(t)) + u(t)^2 * c^2 * (du/dt)^2 * sin^2(c * u(t))
vy^2 = (du/dt)^2 * sin^2(c * u(t)) + 2*du/dt*sin(c * u(t))*u(t)*c*du/dt*cos(c * u(t)) + u(t)^2 * c^2 * (du/dt)^2 * cos^2(c * u(t))
vz^2 = (du/dt)^2
The -2 and +2 terms in vx and vy cancel
v^2 = (du/dt)^2 * cos^2(c*u(t)) + u(t)^2 * c^2 * (du/dt)^2 * sin^2(c*u(t)) + (du/dt)^2*sin^2(c*u(t)) + u(t)^2*c^2*(du/dt)^2*cos^2(c*u(t)) + (du/dt)^2
All terms have (du/dt)^2, so I am pulling it out:
v^2 = (du/dt)^2 * (cos^2(c*u(t)) + u(t)^2 * c^2 * sin^2(c*u(t)) + sin^2(c*u(t)) + u(t)^2*c^2*cos^2(c*u(t)) + 1)
cos^2(a) + sin^2(a) = 1, so we are down a sin and a cos now:
v^2 = (du/dt)^2 * (u(t)^2 * c^2 * sin^2(c * u(t)) + u(t)^2 * c^2 * cos^2(c * u(t)) + 2)
Take out u(t) and c and we have another sin^2 cos^2 identity:
v^2 = (du/dt)^2 * u(t)^2 * c^2 *(3)
(du/dt)^2 * u(t)^2 - v^2/(3*c^2) = 0
v^2/(3*c^2) = C
(du/dt)^2 * u(t)^2 - C = 0

Ok, a different result this time, can you double check if this is correct? And if it is, how do I actually use it? I've solved differential equations in my math classes in the past, but they never explained what they actually are and how to use them. If I remember correctly DEs give solutions in the form of functions, so from here I will find u(t) and use that back in my original equations?
 
  • #28
To make it more readable I have converted your work to Latex.
Darkbound said:
##v_x = \dot u \cos(c u) - u c \dot u \sin(c u)##
##v_y = \dot u \sin(c u) + u c \dot u \cos(c u)##
##v_z = \dot u##
Then when I square them I am using the ##(a+-b)^2## formula to unwrap them for ##v_x## and ##v_y##
##v_x^2 = \dot u^2 \cos^2(c u) - 2 \dot u \cos(c u) u c \dot u \sin(c u) + u^2 c^2 \dot u^2 \sin^2(c u)##
##v_y^2 = \dot u^2 \sin^2(c u) + 2 \dot u \sin(c u) u c \dot u \cos(c u) + u^2 c^2 \dot u^2 \cos^2(c u)##
##v_z^2 = \dot u^2##
The -2 and +2 terms in ##v_x## and ##v_y## cancel
##v^2 = \dot u^2 \cos^2(c u) + u^2 c^2 \dot u^2 \sin^2(c u) + \dot u^2 \sin^2(c u) + u^2 c^2 \dot u^2 \cos^2(c u) + \dot u^2##
All terms have ##\dot u^2##, so I am pulling it out:
##v^2 = \dot u^2 (\cos^2(c u) + u^2 c^2 \sin^2(c u) + \sin^2(c u) + u^2 c^2 \cos^2(c u) + 1)##
##\cos^2(a) + \sin^2(a) = 1##, so we are down a ##\sin## and a ## \cos## now:
##v^2 = \dot u^2 (u^2 c^2 \sin^2(c u) + u^2 c^2 \cos^2(c u) + 2)##
Take out u and c and we have another ##\sin^2 +\cos^2## identity:
##v^2 = \dot u^2 u^2 c^2 (3)##
Fine until that last step. The last term was 2, not ##2u^2 c^2 ##
 
  • #29
Okay, still, what do I do with it?
To simplify it a bit:
v^2 = (du/dt)^2 * u(t)^2 * c^2 *(3)
v = du/dt * u(t) * c * sqrt(3)
du/dt*u(t) - v/(c*sqrt(3)) = 0

P.S. How do I activate LaTeX?
 
  • #30
Darkbound said:
Okay, still, what do I do with it?
To simplify it a bit:
v^2 = (du/dt)^2 * u(t)^2 * c^2 *(3)
v = du/dt * u(t) * c * sqrt(3)
du/dt*u(t) - v/(c*sqrt(3)) = 0

P.S. How do I activate LaTeX?
No, you misunderstand. I am saying you made a mistake. The last line of what I quoted in post #28 is wrong.
 

1. How do I calculate Vx and Vy given V, X, and Y?

To calculate Vx and Vy, you can use the Pythagorean theorem. Vx is equal to the square root of (V^2 - Vy^2), and Vy is equal to the square root of (V^2 - Vx^2). You can also use trigonometric functions to calculate Vx and Vy.

2. What are Vx and Vy used for in scientific calculations?

Vx and Vy are commonly used in physics and engineering to represent the horizontal and vertical components of a vector. They can be used to calculate the velocity, acceleration, and displacement of an object in two-dimensional motion.

3. Can I use Vx and Vy to calculate the trajectory of a projectile?

Yes, Vx and Vy can be used to calculate the initial velocity of a projectile and determine its trajectory. By breaking down the initial velocity into its horizontal and vertical components, you can analyze the motion of the projectile in each direction separately.

4. What units are used for Vx and Vy?

Vx and Vy have the same units as the original velocity, which is typically meters per second (m/s) or feet per second (ft/s). It is important to use consistent units in calculations to ensure accurate results.

5. Is there a specific formula for calculating Vx and Vy?

There is no specific formula for calculating Vx and Vy, as it depends on the given variables and the problem at hand. However, as mentioned before, the Pythagorean theorem and trigonometric functions can be used to calculate Vx and Vy in many cases.

Similar threads

  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
10
Views
1K
  • Introductory Physics Homework Help
2
Replies
38
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
182
  • Introductory Physics Homework Help
2
Replies
50
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
3K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
28
Views
261
  • Introductory Physics Homework Help
Replies
30
Views
3K
Back
Top