How to Calculate Gain and Phase
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to Calculate Gain and Phase
I have a question.
I want calculate Gain and Phase.
But I can not calculate Gain. Phase is OK.
??? I want to attach MATHCAD file. But I do not know how do I attach the file the message.
Please advise me.
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here is your first file "repaired" using vectorization and made some changes with s (similar to waht you did in your last file)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Use "Choose File" button to load a file or use photo to load pictures.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ppal wrote:
Use "Choose File" button to load a file or use photo to load pictures.
By me it does not work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I tried attached MATHCAD file. But the followind message is appeaerd.
The attachment's question.xmcd content type (application/x-mathcad-xmcd) does not match its file extension and has been removed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have also confusion.
From community botton of resource tab on MATHCAD menu, the following URL is appeared.
But this URL is not available.
https://community.ptc.com/t5/PTC-Mathcad/ct-p/PTCMathcad
URL on MATHCAD menu is correct ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The forum has been moved to a new software, which means new (im-)possibilities.
I suggest you make a screen shot of your problem, save that as a picture file and attach it.
Success!
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This forum software is quite new to all of us and there still are a lot of bugs.
Not being able to attach files with extension mcd, xmcd, etc. is one of them.
It should work if you put the file in a zip-file and upload the zip file.
I guess zip's are allowed - I'll try in this reply.
EDIT: Yes, it works. You see the attachment to the right of this text -->>
Its a shame that the used theme is wasting so much space.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for your reply.
But I have another calculation. Please attached file.
In this calculation the formula of calculation is OK. It means absolution of complex is | | is no problem.
If possible I want to know this difference.
Best Rgs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
> If possible I want to know this difference.
You mean why your first file failed and your current file question_3 works OK?
This is mainly because in your older file f was a vector, not a range as it is in the new file.
vectors and ranges are quite different and often are mixed up.
I try to attach two articles which Stuart created quite a while ago.
To make the old file work you would have to vectorize the call GPA(f).
There also are some differences in the definition and use of function/argument s in the two files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here is your first file "repaired" using vectorization and made some changes with s (similar to waht you did in your last file)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for your adovise.
I am clear this calculations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have question again.
If possible, please advise me.
Phase (argument) is calculated by not vector.
Is this specification of MATHCAD ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Because the function argPA already transforms f to s, the last evaluation in Werner's attachment should should not be:
argPA(s(f)=
but instead:
argPA(f)=
Does that solve your problem?
Success!
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I understand your advise.
Thanks so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@LucMeekes wrote:
Because the function argPA already transforms f to s, the last evaluation in Werner's attachment should should not be:
argPA(s(f)=
but instead:
argPA(f)=
Yes, you are right.
This evaluation was left over from ssato's first sheet and should have been deleted.
I understood that the question was why vectorization is not need for the phase calculation. See my answer below (oops, above, as we only have linear view here - confusing).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ssato wrote:
I have question again.
If possible, please advise me.
Phase (argument) is calculated by not vector.
Is this specification of MATHCAD ?
The "feature" you experience here is called implicit or automatic vectorization.
Whenever an operation is a applied to vectors which is not defined or does not make sense vor vectors, Mathcad automatically uses vectorization - that means it applies the calculation singly to every element of the vectors (they must have same dimensions for this to work) and collect the result in a vector.
The calculation of the phase uses functions which are not defined for vectors and so Mathcad automatocally vectorizes. The calculation of the gain GPA(f) uses at first the absolute value of s(f). f is vector, s(f) uses no vector operation so its a vector, too, due to automatic vectorization, but the absolute value |s(f)| is defined for vectors, too, giving you the vector length. This consatnt value is now used for the further calcuation and this is the reason why without vectorization the result of GPA(f) ist constant 38.072.
With explicit vectorization |s(f)| means to apply the absolute value to every single element of s(f) and do the calculations with those values one after the other.
As a cocnlucsion: If you want vectorization done you are on the safe side if you apply it manually, even then if it would not be necessary as is the case in the phase calculation.
Here some examples:
Examples:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Two additional remarks:
1) You don't have to define j. Its built-in and you can use either i or j. Using Menu "Format" - "Result" - "Display Options" you can chose what you want to see in an evaluation, i or j.
To use i or j you must type 1i or 1j without a space or multiplication dot between. If your expression uses something like 2.54j this works as well, as long as you type j immediately after the last digit. The 1 is not shown when you click outside of your expression, so all looks as it should be.
2) Instead of converting from radians to degree manually you should let Mathcad do the job. Simply divide by degree in the plot (see picture). Instead of the degree sign (which is easily available on my German Keyboard) you may also type "deg" (without the quotes). Writing f/Hz at the abscissa is not really necessary as 1/s is the default unit anyway, but I thought it looks better that way 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you so much for everyone.
I have another trouble.
A few days late , I will return to here, and reply your answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Maybe it would be a good idea to open a new thread for your new question.
