This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

V-I Characteristics of PV Emulator in Solar Explorer Kit

Other Parts Discussed in Thread: CONTROLSUITE

  The V-I characteistic of PV Emulator is shown as such in the manual(see attachment). Here the voltage varies a lot with irradiation while current not so much. But in reality it is supposed to be the opposite ! Is the VI characteristics wrong ?

  • Hi Arpan,

    The above curve seems more like a temperature variation based curve instead of irr. variation.Something like this:

    Regards,

    Gautam

  •  In this manual, they are indicating that the voltage varies proportionately to irradiance

  • See I have uploaded the oher graph given in this manual .
  • Arpan,

    the idea behind the PV emulator on the solar explorer kit was to give a quick demo with some sort of PV characteristics implemented in the emulator. 

    We used a basic curve and then just linearly scaled it based on luminance, and did not modify it with complete non linear characteristics that a panel will show under varying lighting conditions. 

    The control scheme does not change irrespective of PV characteristics in the emulator. Which is the primary focus of the kit.

    The aim was not to provide a PV emulator reference  design. The source code is available in controlSUITE and you can modify based on what you need for your application.  

  •  But as its named PV Emulator, it should emulate the characteristics as much as possible ! It does hinder some experiments which involve change of irradiation ! Now I will have to spend time coding instead of performing experiments.
    I want to add that this whole kit seems very slipshod . Ill designed hardware and the codes given in the control suite folder don't work by default. All of them have to be debugged and minor problems weeded out.
    Its quite disappointing and not of the quality expected from TI.

    And I want to add that I don't use internet as a means of venting frustration and generally avoid online criticism.

  • I apologize for the bad experience , wish you all the best!
  • I, like Arpan, would like to modify the I-V lookup table in the software, but I can't for the life of me find which file contains it. Please could you be more specific about where it is located? Thanks.

  • Susan,

    Please import the following project

    C:\ti\controlSUITE\development_kits\SolarExplorer_v1.1\SolarExplorer_PVEmulator_F2802x

    You would see a PV_Table1.asm which is a current referenced voltage set command look up table, there is only one table  being used, for the illumination this table is simple scaled by a gain factor. 

    It is read in the ISR, refer to the DPL-ISR.asm file

    MOV @AR0,AH 

    .ref _PVTablePtr
    MOVW DP,#_PVTablePtr
    MOVL XAR1,@_PVTablePtr
    MOV AL,*+XAR1[AR0]

    .ref _Value_Asm
    MOVW DP,#_Value_Asm
    MOV @_Value_Asm, AL

    MOVL ACC,@_Value_Asm
    LSL ACC,#16
    MOVL XT,@ACC

    .ref _Vout_Ref_Asm
    .ref _VmaxSenseInv
    MOVW DP,#(_VmaxSenseInv)
    QMPYL ACC,XT,@_VmaxSenseInv

  • Great, I see it now. Thank you kindly!
  • Hi,
    I'm trying to modify the characteristics of the emulator. Instead of using the lookup table, I am using some equations.
    Now I need my calculated reference voltage to actually be the voltage in the emulator output. I noticed that Vout ref is provided by ASM, but my equations are in C (written in SolarExplorer_PVEmulator-main.c).
    Can you please tell me how to send my calculated voltage to the variable that actually sets the output voltage?
    I'm not familiar with ASM code.

    Thanks.
  • Hi Hiago,
    I'm sorry I can't help you (I don't know asm either!) but I'm interested to know more about the structure of your solution? My dumb idea was just to plot a more realistic I-V curve somewhere and copy in the numerical values to replace the ones in the lookup table, and then make the current (rather than voltage) scale with light level.
  • I'm sorry, I can't make sense of the assembly code at all. I've been learning assembly language, but I'm still unfamiliar with the structure, and can't find what things like "ZAPA" and "MAXL" mean, or any clear examples on the use of "@" or "*" before a variable name, and countless other things. Is there any TI-specific documentation that could help me?
  • Hi, me again, sorry - I think I get it vaguely now - if I express it in pseudo-code it's like
    - read in PV current I_pv, and Luminance
    - find row of lookup table corresponding to I_pv
    - take entry from that row
    - multiply by Luminance
    - output as reference PV voltage

    Now, what I want to modify it to is:
    - read in I_PV and Luminance
    - find I_PV divided by Luminance (so generally a higher value of current)
    - find row of lookup table corresponding to I_PV/Luminance (need some workaround if I_PV/Luminance is higher than maximum of lookup table)
    - take entry from that row
    - multiply by A*log(B*Luminance) , where A and B are constants (do I need another lookup table in order to do 'log'?)
    - output as reference PV voltage

    I'm concerned I won't be able to make it work if I don't understand what all the '@' and '#' signs are for, what relation does register AH bear to ACC (otherwise it looks like AH appears out of nowhere?), what is the purpose of all the LSL, LSR (I know it stands for logical shift left/right, but I don't understand why they are done in all the places they're done in.)
  • I figured out how you can do it using C code, just forget about the .asm file.
    Type your equations (or lookup table) in the main.c file, then connect whichever variable contains the reference output voltage value to the MATH_EMAVG block, replacing  "MATH_EMAVG_In1=&Vout_Ref_Asm_Lum;"  with  "MATH_EMAVG_In1=&YOUR_VARIABLE;". You should find it easily searching for that line using ctrl+F.

    Reminder: that variable must contain the reference output voltage divided by 33.3, so its range is from 0 to 1.

  • Thanks so much for sharing this. Unfortunately I'm very bad with C++ and I can't get anything to work.

    I defined some new variables:
    volatile long my_Vout_Ref;
    Uint16 Iout_fb_compareval;

    and then inserted my equation...
    //ADCDRV_1ch block output connections
    ADCDRV_1ch_Rlt2 = &Iout_fb;
    ADCDRV_1ch_Rlt1 = &Vout_fb;
    Iout_fb_compareval = (Uint16)ADCDRV_1ch_Rlt2; // line 483

    // MATH_EMAVG block connections
    if ( Iout_fb_compareval < 3* Gui_LightCommandValue)
    {
    my_Vout_Ref = 28 * log(1 - (&Iout_fb - 3* Gui_LightCommandValue)/0.1) / 3.433987 / 33.3; // line 488
    }
    else
    {
    my_Vout_Ref = 28 * log(1 + (3* Gui_LightCommandValue)/0.1) / 3.433987 / 33.3; // line 492
    }
    MATH_EMAVG_In1= &my_Vout_Ref;
    // MATH_EMAVG_In1=&Vout_Ref_Asm_Lum;

    and get this error upon compiling:
    "Compilation failure
    subdir_rules.mk:49: recipe for target 'SolarExplorer_PVEmulator-Main.obj' failed
    "../SolarExplorer_PVEmulator-Main.c", line 483: warning: conversion from pointer to smaller integer
    "../SolarExplorer_PVEmulator-Main.c", line 488: warning: function "log" declared implicitly
    "../SolarExplorer_PVEmulator-Main.c", line 488: error: expression must have arithmetic type
    "../SolarExplorer_PVEmulator-Main.c", line 492: warning: function "log" declared implicitly"

    I thought 'log' only needed the <cmath> header, which the Main file includes? And isn't 'long' an arithmetic type already? Sorry for the stupid questions, but I'm really stuck. Something else I'm wondering - if you make these changes to the PVEmulator Project, will they carry across to all the other projects (PVInverter, PVBattChg), or do you need to change something in them too?
  • Hi, i modified the PV_Table1 file in order to get the PV characteristics i wanted, but it does not work, it still giving to me the same values it has with the older file.

    How can i modify the PV emulator code in order to modify the PV characteristics. I was changing the "gui_lightComandValue to change the radiation of the PV and that's the way i'm testing the PV emulator

    Which variable should i change to emulate the characteristics i wanted and to emulate the radiation?

    thank you

    Regards