General

General

How to evaluate signal norms only for a portion of the time range calculated in a transient analysis in Ansys Maxwell when the frequency is defined as a parameter? For example, evaluate the mean core losses for the last electric period simulated.

    • SolutionSolution
      Participant

      Since the “range functions” do not accept parameter values as limits, a different approach has to be used. The total number of periods of the simulation should be known. Assuming the following parameters N_periods … Total number of electric periods of the transient simulation ElectricPeriod….. Electric period of the signal (i.e., 1/(electric frequency)) To calculate the average core loss during the last period, following expression can be used: integ((time>(N_periods-1)*ElectricPeriod)*CoreLoss)/(ElectricPeriod) The comparison expression, (time>(N_periods-1), returns 1 or 0 depending on if it is true or false and works as a “mask” for the integral. This expression returns a transient signal which is constant. Its value is the average value required. To obtain a single scalar number the everage function can be applied to it. This leads to: avg( integ((time>(N_periods-1)*ElectricPeriod)*CoreLoss)/(ElectricPeriod) ) This reasoning can be adapted to different situations, for example: – Different quantities (e.g. mean torque, replacing CoreLoss above by Moving1.Torque) – Calculation along a different window (e.g., multiple electric periods at the end of the simulation, by replacing “N_periods-1” by some other criterion) – Calculation of different signal norms (e.g., average, rms, pkavg), since these norms are often mathematically expressed as one or multiple integrals (with varying integrands) divided by the “window” of the integral. A calculaiton of the RMS value of the induced voltage of a winding with a name PhaseA would require the following expression: avg(sqrt(integ((time>=(N_Periods-1)*ElectricPeriod)*(InducedVoltage(PhaseA))^2)/ElectricPeriod)) Attached to this solution there is a project example clarifying the approach to calculate the average core loss for the last electric period and the rms value of the induced voltage across a winding. These expressions can also be used when defining calculation quantities for an Optimetrics analysis. This is also demonstrated in the example attached. Please review the Optimetrics Tab.

      Attachments:
      1. 2065332.zip