Hello friends, welcome again to my YouTube channel RF Design Basics. In continuation with my previous lecture on introduction to coordinate systems, in this lecture we are going to study about the conversion formula from one coordinate system to another coordinate system. So first of all, let us take rectangular and cylindrical coordinate system and try to establish the relation between these two. So, let's say a vector a is given in terms of rectangular coordinate system having magnitude in x direction is ax, y direction is ay and z direction is az. Now we have to convert this into cylindrical coordinate system so that I can write this vector in form of cylindrical coordinate system as a equal to a rho a rho, a phi in phi direction, a z in z direction where a rho is the magnitude in rho direction, a phi is magnitude in phi direction and a z is magnitude in z direction.
We can see that in z direction there will not be any change in the magnitude as we have the same value as in the rectangular coordinate system but in Rho and Phi direction it is going to change. So to calculate that we have to calculate the A Rho by using this. So we can find a component of vector in any direction by taking the dot product of that vector with that direction. So here if I want to find component in Rho direction I have to take dot product of this complete vector with a row direction a row unit vector so it will be a dot a row unit vector and for phi direction it will be a phi which is a dot a phi direction so when we apply this what we found is when we apply this a here a x a y and a z and take dot product with a row We will have ax.arrow, ay.arrow and az.arrow in our expressions. So ax.arrow, ay.arrow and az.arrow which ultimately going to be 0. That's why it is not shown here.
Similarly for a5 it will be ax.afi, ay.afi and az.afi which is again 0. So to make this conversion table first of all let us make the coordinate system in x y and z direction where this is the direction of unit vector ax ay and az. Now try to find the direction of unit vector rho phi and z. So for that the rho will be in this direction because this is rho.
So the unit vector direction of a rho will be also same and phi is moving in this direction. So the a phi will be perpendicular to rho as well as z that means a rho a phi will be perpendicular to a z. So now find the relation between a rho and ax. So we can see a rho and ax there is angle phi.
So the dot product of a rho and a phi ax and a rho will be dot product of ax and a rho will be cos phi. So dot product of ax and a rho is cos phi. Similarly if we take dot product this arrow with a y it will become sine Phi because the angle is 90 minus 5 so it will become sine Phi and if we take arrow and a that the angle between this is 90 degree hence the dot product will be 0 Now to find the dot product between A Phi and AX, we can use the angle as Phi plus 90. So the angle is actually 90 plus Phi between AX and A Phi.
So if we take AX dot A Phi, AX dot A Phi, this will be cos. 90 plus phi which will be minus sine phi. Similarly if I take ay and a phi direction ay and a phi so this will become sine 90 plus phi because we have already taken sine phi here so here it will become sine 90 plus phi and that is nothing but cos phi this cos phi.
And when we take this with z, z and phi is perpendicular to each other. So it's 0. Similarly for az and ax, dot product of az, ax is 0, az, ay is 0 and az, az is 1. So this is how we can find the conversion table. And this conversion table is very useful when we are converting from rectangular to cylindrical or cylindrical to rectangular.
So let us take an example of this. So in this we have taken a vector b which is yax minus xay plus zaz and we have to convert this vector into cylindrical coordinate system. So remember when it is asked to convert completely into cylindrical coordinate system it means that the unit vector as well as the variables which is used here that is y, x and z should be converted into cylindrical coordinate system and we know that x in terms of cylindrical coordinate system is rho cos phi and y is rho sine phi and z is same as z. So wherever we have x and y we will be replacing with rho cos phi and rho sine phi in our calculations and ax ay and az this will be converted into cylindrical coordinate system.
So first of all let us take b rho So, B is B rho A rho, B phi A phi and B z a z. So, B rho will be dot product of B in the direction of rho which is y cos phi minus x sin phi. So, y ax dot A rho, y ax dot A rho is cos phi.
So, we have taken that as cos phi and ay dot A rho. So, ay dot A rho. a rho is sine phi. So, it is y cos phi minus x sine phi. Then y will be replaced with rho sine phi here and x is replaced with rho cos phi and when we calculate we will get it as 0. Then second one is b phi.
So, b dot a phi. b dot a phi means we are going to take dot product of a x with a phi. So, a x dot a phi is minus sine phi. So it will give minus y sine phi. Then we have a phi dot a y.
So a phi and dot a y. So a phi dot a y is cos phi. We can take minus x cos phi. And by putting the value of y from here as rho sine phi and x as rho cos phi, we can find as minus rho sine square phi minus rho cos square phi.
So sin square phi plus cos square phi is 1. So it will become minus rho. Bz will remain same. That is already z.
So if we take dot product, we will again get z. So the vector will be b equal to 0 a rho plus minus rho a phi plus z az. So b is minus rho a phi plus z az.
This is our converted vector. from the rectangular coordinate system to cylindrical coordinate system. Next, we are going to study about conversion from rectangular to a spherical or a spherical to rectangular. So this conversion can be done in both the way. Suppose we have been given with rectangular coordinate system again we will do the same thing to find Bx we can take B dot Ax.
So that way we can calculate the, we can convert cylindrical to rectangular. Here to convert rectangular to spherical, we will take a vector. and write the form, a spherical form of this and take the component in R direction that is A dot AR.
So it will have AX dot AR, AY dot AR and AZ dot AR. Similarly when we take component in the direction of theta, we have AX dot A theta, AY dot A theta and AZ dot A theta. In phi direction we have AX dot A phi. ay dot fi and az dot fi.
So we are going to calculate these all dot product and we will form a table which is known as conversion table from rectangular to spherical or spherical to rectangular. So to calculate that let us make the coordinates system again. So let's say this is x y and z.
As we know that this point is let's say p which is r theta phi. So the direction of a r will be this and a z direction is this. This is a x and a y. So to find dot product between a z and a r the angle between this is defined as theta So this will be az dot ar will be cos theta because angle between these two. So we can see az and ar is cos theta.
Now next is ay and ar, ax and ar. So for ax and ar, we will take the projection on xy plane. So this projection is nothing but r sin theta. So this projection is r sine theta and this angle is phi.
So in between x and this projection it will be cos phi. So r sine theta cos phi. When we are just converting it, so the angle between these two will be sine theta and cos phi. So it's sine theta cos phi. Similarly when we take the unit vector in the direction of y.
and AR then AR projection will be sin theta and then sin phi. So it will be sin theta sin phi. Same way we can calculate for theta reaction. Theta reaction is 90 degree more than this AR direction. AR is theta then this is 90 degree.
So this will become 90 plus theta. So wherever we have theta, if we just replace that theta with 90 plus theta. we can convert from ar to a theta.
So here this theta sin 90 plus theta is cos theta. So ax dot a theta will become cos theta cos phi. Here sin 90 plus theta is cos theta.
So ay dot a theta will become cos theta sin phi. So in place of theta just write 90 plus theta to get these two terms. Remaining terms will remain same. So This 5 completed. Now the angle between a theta and az.
So here also in place of theta if I write 90 plus theta so cos 90 plus theta is minus sin theta. So this is how we can write first column and then the second column. For third column we have to know angle between x and phi which was already done in case of cylindrical coordinate system. So when we write ax ay az with a phi so this one is minus sine phi cos phi and zero the logic remains same when we calculate angle between ax and a phi that will be 90 plus phi so that can be written as minus sine phi here also it will be cos phi and zero. So this is how we can complete the conversion table and next we'll take one example using this conversion table you We will solve that example.
So let us take a vector g which is x z by y ax into a spherical coordinate system. We have to transform this vector into a spherical coordinate system and this vector is only in x direction but it will have all the components including gr, g theta and g phi. To calculate gr, so these are the three components in a spherical coordinate system. To calculate gr, take dot product with ar. So ax.ar, x, z and y can be written from here, which is the formula for converting any point in a spherical coordinate system to a rectangular coordinate system.
So by putting this value x, y and z and ax.ar, ax.ar is sine theta cos phi, we can calculate this. Similarly, g theta is g.a theta. So g dot a theta means g is ax. So ax dot a theta and ax dot a theta here is cos theta cos phi.
So by calculating by putting this as cos theta cos phi and the remaining value of xyz we can find this as g theta. Similarly it can be calculated as g phi and finally we can write the converted vector in form of g r ar. g theta a theta and g phi a phi.
So this is how you can convert from rectangular to a spherical or a spherical to rectangular. If a spherical is given again we can apply this dot product and find the respective component in x y and z and for the converting x y z points into rho r theta phi you can refer my previous video where I have explained the conversion formula for the points. Thank you.