アプリ版:「スタンプのみでお礼する」機能のリリースについて

卒業研究でよく分からないところがあるので教えて欲しいです。

インバータ用組み込みソフトウェア開発システム(RE-PRO/F28335A)を用いてオシロスコープにグラフを表示させました。

プログラムは三相の波形に高調波成分を加えたプログラミングです。

写真のような結果が出ました。
1+5は基本派と5次高調波を合成したものです。
1+5+7は基本派と5次と7次の高調波を合成したものです。

この流れの概要を分かりやすく説明をして頂きたいです。
機器の説明からその機器はどのような役割を果たすのかなど教えて頂きたいです。
/********************************************************************************************************************************************
Title : Sample Program for PE-PRO/F28335A
Sub title : Sample Program of D/A conversion
Copyright : 2010 Myway Corporation

Explanation : This program performs D/A conversion function on PE-PRO/F28335A.

Control board : PE-PRO/F28335A
*********************************************************************************************************************************************/
#define DAC_ENABLE
#include <mwio.h>
/* Header file of I/O library for PEOS/F28335*/
#include <pro_f28335.h>
/* Header file for PE-PRO/F28335A*/
#include <pro_f28335.c>
/* Peculiar module for PE-PRO/F28335A*/

#define PI(n) (3.14159265358979 * (n))
#define PERIOD 20000
/* 1/(50Hz) = 20ms = 20000us*/
#define SAMPL 200
/* Number of sampling points*/

volatile FLOAT32 dwt = PI(2.0) / SAMPL;
volatile FLOAT32 m = 1.0;
FLOAT32 u = 0.0;
FLOAT32 v = 0.0;
FLOAT32 w = 0.0;
FLOAT32 wt = 0.0;
void func_test(void);

#pragma INTERRUPT(func_test)
void func_test(void)
{
int_ack();

wt += dwt;
/* Phase angle*/

if (wt > PI(1.0)) { wt -= PI(2.0); }
/* When the phase angle reaches pi, it is turned to be -pi*/

u = m*mwsin(wt + PI(2.0 / 3.0))+(m/5.0)*mwsin(5.0*wt + PI(10.0/3.0));+(m/7.0)*mwsin(7.0*wt + PI(14.0/3.0));
/* Generation of 3-phase sine wave*/

v = m*mwsin(wt )+(m/
5.0)*mwsin(5.0*wt );+(m/7.0)*mwsin(7.0*wt );
w = m*mwsin(wt - PI(2.0 / 3.0))+(m/5.0)*mwsin(5.0*wt - PI(10.0/3.0));+(m/7.0)*mwsin(7.0*wt - PI(14.0/3.0));

pro_da_out(0,u); /* Output data for viewing waveforms in DAC*/
pro_da_out(1,v);
pro_da_out(2,w);

timer0_clear_int_flag();
/* Clearing the interrupt flag.*/
}

int main(void)
{
int_disable();

system_init();
#if !defined(F28335LMT)
watch_init();
#endif

timer0_init( PERIOD / SAMPL );
/* Initialization of Timer0 and setting interrupt period*/

/* After the initialization, Timer0 is stopped, */

/* and Timer0 interrupt is inactive.*/

timer0_init_vector( func_test );
/* Timer0 interrupt routine definition*/
timer0_start();
/* Starting Timer0 counter*/
timer0_enable_int();
/* Enabling Timer0 interrupt */

int_enable();
/* Enabling all interrupts */

pro_da_init();
/* Initialization of DA converter*/
pro_da_set_range(0, 1.5);
/* Setting range DA output level*/
pro_da_set_range(1, 1.5);
pro_da_set_range(2, 1.5);

while(1){
#if !defined(F28335LMT)
watch_data();
/* Sending data for viewing waveforms in WAVE*/
#endif
}
/* NOTREACHED */
return 0;
}

「卒業研究でよく分からないところがあるので」の質問画像

A 回答 (1件)

現物のことを全く知らないので想像だけでモノを言いますが、それ用のAPIがあって、timer_ほげほげ()関数やpro_da_ほげほげ()関数でパラメータやら条件を設定してやって、無限ループ内でwatch_data()関数を呼び出すと、定期的にfunc_test()関数が呼ばれてほんのちょっとだけ時間パラメータが変化しながら値を出力できる、的なものなのかなと。

オッシロは普通のオッシロなのであれば、信号を取るのに使うプローブ的なものがPCの出力端子になっていて、そこから信号が出るので、オッシロの画面上にプロットした波形が表示される、っていう代物なのかなぁと思います。

簡単に言えば、時系列に対する重畳波形をfunc_test()で計算していて、3チャネル(uが0、vが1、wが2)それぞれに出力している、と。変数名から想像するに、wtはωt、dwtはΔωtっぽいので、時系列に対する位相がwtなんでしょう。

で、何が知りたいのですか?
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!

このQ&Aを見た人はこんなQ&Aも見ています