资源简介

风机仿真模型及代码 Simulation of a Microturbine Generation System for Grid Connected and Islanding Operations The ever-increasing need for electric power generation, steady progress in the power deregulation and utility restructuring, and tight constraints over the construction of new transmission lines for long distance power transmission have created increased interest in distributed generation (DG) sources[1~3]. The fundamental concepts for the penetration of DG technologies are the high efficiency of the energy conversion process and the limited emission of pollutants with respect to conventional power plants. They are relatively small in size (relative to the power capacity of the system to which they are connected), and are modular in structure. These power generation devices can be placed in power systems (mainly at the distribution level) for grid reinforcement, offering a higher flexibility and load management, reducing power losses and on-peak operating costs, improving voltage profiles and load factors, deferring or eliminating the need for system upgrades, and improving system integrity, reliability and efficiency.

资源截图

代码片段和文件信息

/*
 * This file is not available for use in any application other than as a
 * MATLAB(R) MEX file for use with the Simulink(R) product.
 */

/*
 * grid_connected_testsystem_acc.c
 *
 * Real-Time Workshop code generation for Simulink model “grid_connected_testsystem_acc.mdl“.
 *
 * Model version              : 1.162
 * Real-Time Workshop version : 7.5  (R2010a)  25-Jan-2010
 * C source code generated on : Sun Jun 02 23:41:11 2013
 *
 * Target selection: accel.tlc
 * Note: GRT includes extra infrastructure and instrumentation for prototyping
 * embedded hardware selection: 32-bit Generic
 * Emulation hardware selection:
 *    Differs from embedded hardware (MATLAB Host)
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */
#include 
#include “grid_connected_testsystem_acc.h“
#include “grid_connected_testsystem_acc_private.h“
#include 
#include “simstruc.h“
#include “fixedpoint.h“
#define CodeFormat                     S-Function
#define AccDefine1                     Accelerator_S-Function
#ifndef __RTW_UTFREE__

extern void * utMalloc(size_t);
extern void utFree(void *);

#endif

/* Buffer management routine for variable delay block */
boolean_T grid_connected_testsystem_acc_rt_TDelayUpdateTailOrGrowBuf(
  int_T *bufSzPtr                     /* in/out - circular buffer size                 */
  int_T *tailPtr                      /* in/out - tail of circular buffer              */
  int_T *headPtr                      /* in/out - head of circular buffer              */
  int_T *lastPtr                      /* in/out - same logical ‘last‘ referenced index */
  real_T tMinusDelay                  /* in     - last point we are looking at   */
  real_T **tBufPtr                    /* in/out - larger buffer for time         */
  real_T **uBufPtr                    /* in/out - larger buffer for input        */
  real_T **xBufPtr                    /* in/out - larger buffer for state        */
  boolean_T isfixedbuf                /* in     - fixed buffer size enable       */
  boolean_T istransportdelay          /* in     - block acts as transport dela y */
  int_T *maxNewBufSzPtr)
{
  int_T testIdx;
  int_T tail = *tailPtr;
  int_T bufSz = *bufSzPtr;
  real_T *tBuf = *tBufPtr;
  real_T *xBuf = (NULL);
  int_T numBuffer = 2;
  if (istransportdelay) {
    numBuffer = 3 ;
    xBuf= *xBufPtr;
  }

  /*    Get testIdx the index of the second oldest data point and
   *    see if this is older than current sim time minus applied delay
   *    used to see if we can move tail forward
   */
  testIdx = (tail < (bufSz - 1)) ? (tail + 1) : 0;
  if ((tMinusDelay <= tBuf[testIdx]) && !isfixedbuf) {
    int_T j;
    real_T *tempT;
    real_T *tempU;
    real_T *tempX = (NULL);
    real_T *uBuf = *uBufPtr;
    int_T newBufSz = bufSz + 1024;
    if (newBufSz > *maxNewBufSzPtr) {
      *maxNewBufSzPtr = newBufSz;      /* save for warning*/
    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-01-10 22:54  models in Simulink\
     文件      146685  2008-06-23 00:36  models in Simulink\grid_connected_testsystem.mdl
     文件       55296  2013-06-02 23:41  models in Simulink\grid_connected_testsystem_acc.mexw32
     文件       73700  2008-06-21 00:15  models in Simulink\inve_grid_testsystem.mdl
     文件      124532  2008-06-23 16:11  models in Simulink\islanding_testsystem.mdl
     文件       59392  2013-06-02 23:42  models in Simulink\islanding_testsystem_acc.mexw32
     文件       58280  2008-06-23 16:41  models in Simulink\pmregulator_testsystem.mdl
     文件       44371  2008-06-20 00:30  models in Simulink\rectifier_testsystem.mdl
     目录           0  2014-01-10 22:54  models in Simulink\slprj\
     目录           0  2014-01-10 22:54  models in Simulink\slprj\accel\
     目录           0  2014-01-10 22:54  models in Simulink\slprj\accel\grid_connected_testsystem\
     文件       15279  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\buildInfo.mat
     文件          88  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\defines.txt
     文件         133  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem.bat
     文件        8367  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem.mk
     文件      102587  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem_acc.c
     文件       67313  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem_acc.h
     文件       66886  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem_acc.obj
     文件       40144  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem_acc_data.c
     文件        2233  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem_acc_data.obj
     文件        3489  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem_acc_private.h
     文件         950  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem_acc_types.h
     文件           0  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\grid_connected_testsystem_ref.rsp
     目录           0  2014-01-10 22:54  models in Simulink\slprj\accel\grid_connected_testsystem\html\
     文件        1177  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\html\reportInfo.mat
     文件          37  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\modelsources.txt
     文件        3463  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\rtGetInf.c
     文件         959  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\rtGetInf.h
     文件        1000  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\rtGetInf.obj
     文件        2426  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\rtGetNaN.c
     文件         884  2013-06-02 23:41  models in Simulink\slprj\accel\grid_connected_testsystem\rtGetNaN.h
............此处省略66个文件信息

评论

共有 条评论