The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hi, I want to create orthogonal signals with C block but, I cannot.Can you help me, please?
the c math libraries are available so you can use the sin and cos functions in the c block.
Using a "static" variable will allow you to track theta for the calculations.
static
Thanks for your helping. I try but I cannot. Do you have any code?
static double theta = 0;double freq = 60;theta = theta + freq*2*3.1415926/1000;y1 = cos(theta);y2 = sin(theta);
This code should exectue at 1kHz to achieve a 60 Hz output, for faster interrupts change the "/1000" to the new frequency.
Thanks for your reply. For example, I have an sine input, how can give a delay for this signal (as two orthogonal signal)?
Hi Yasaf,
Continuing on the Albert's code.
Let say your input y1 = sin(theta);y2 (delay one)= -sin(theta-pi/2);…If you delays your input by pi/2 and make it negative, then y2 is actually cos (theta). Then y1 and y2 are orthogonal now.
What kind of ckt. u are working on? What's your PSIM schematic look like?
Hi AmitI send a file. Can you control it, please?
Try this with Simplified-C-Block. You can watch this video to get know more about this.
https://www.youtube.com/watch?v=HreH4Cx-a94
Regards,Amit
Yes I found the information useful it helps me from your code albert since i am also finding answer for thiseven I tried this PrepaidGiftBalance and get worth result.
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…