Cumulative Moving Average?

Hi,
I would like to use Signal Express to create a cumulative moving average, running "every 100 data" points, from data point to data point until the end of my recorded signal.
So, for example, I would be producing a new signal from my initial signal; creating an average from data point 1 to 100, then an avearage of data point 2 to 101, 3 to 102, and so forth until the end of my recording. Is there a step in signal express that can accomplish such a task?
My hope is in the end to create a sort of running average of  the sums of squares, every 100 data points, from my initial recording.
I have first recorded a voltage signal, and then by using the Formula step I have squared each value of my recorded sample. Now all I seek to accomplish is the "running average" of this newly squared signal.
Seeking any and all advise. Many thanks.
GYepes

I find the description of the task a little confusing.  The title is "cumulative moving average" which seems contradictory to me.  A moving average analysis is a statistical time-series method of smoothing a signal's frequencies with a wavelength equal to the time span of the average.  Frequencies greater or lesser are not smoothed.  The method does not accumulate anything, thus the contradiction.  If the task is to recalculate the average for all samples recorded for every project iteration, then that is more like a cumulative average?  From the more detailed description it seems the former is more likely the task.  Additionally I am unsure if the task is to "process" a signal in real time or to "analyze" a pre-recorded signal?
Let me encourage the exploration of the Process steps for real time signals, and Analysis steps for pre-recorded signals.  Signal Express has sophisticated numerical methods to meet most needs.  Take a look at "Processing - Analog Signals - Time Averaging" as a first guess to satisfy your needs.  I sincerely hope this helps to clarify the task - a problem well defined is half solved (anon.).

Similar Messages

  • Wrong cost allocated for the Moving Average item

    Dear Experts,
    Please see this inventory audit report.. Wrong cost allocated for the Moving Average item
    [screenshot here|http://www.flickr.com/photos/45736280@N07/4347146537/sizes/o/]
    Please help advice why.
    Warmest Regards,
    Chinho

    Oh yes, István is totally correct. I realized I had gotten my definition of Moving Average calculation wrong.
    The actual moving average cost price is actually calculated in the background after each purchase. The cost price shown on the screen for each purchase is simply the cost price in the purchase document.
    At the point of each purchase, the Moving Average price is updated as:
    Actual moving average price = (Last total cumulative value + current purchase trans value) / (Last Cumulative Qty + current purchase qty)
    Hope it helps and Thanks guys for the advice!
    Regards,
    Chinho

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • Moving average price in case of goods receipt with free of charge

    Hello everyone,
    Need some inputs......
    Sometimes we receive materials from suppliers free of charge (e.g. warranty replacement) u2013 moving average goes down u2013 worst case 0,01 EUR/piece. This causes problems in government reporting and export documentation EX1 and clearance/pro-forma invoice) for deliveries to field engineers (Order type ZIS1, ZIS3 u2013 item cat. ZICA), because moving average price is used for the values in government reporting and on the invoices. In government reporting and on invoices we need to state a true value of the part.On the other hand, the value warehouse stock is depending on the moving average cost as well.Could you please let me know, how to handle such receipts from the supplier to have a correct stock value and correct values on invoices and government reporting?
    Thanks
    Deepthi...

    Hello Deepthi,
    It depends on your company policy. If you want to valuate the material along with the material purchased handled in moving average price, free consignment will bring down the MAP for the material.
    In that case, you can revaluate the material to the original price in MR21 transaction.
    If you are not going to handle the materials received free of charge along with the purchased material, you can go with another material code, with non valuated material type.
    But i guess, no company will be asking for another material code. So go for revaluation after the receipt of free consignment.
    Regards

  • Exponential Moving Average - EMA - in PowerPivot

    Hello All
    We´re having a challenge trying to put the [20] (trading days) Exponential Moving Average (EMA) in our data model in PowerPivot.
    Here is the EMA formula and sample spreadsheet:
    http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:moving_averages
    Pasted the formula here for convenience:
    SMA (simple moving average): [10] period sum / [10]
    Multiplier: 2 / ([Time period] + 1) )
    EMA: {Close - EMA(previous day)} x multiplier + EMA(previous day).
    Sample spreadsheet
    http://stockcharts.com/school/data/media/chart_school/technical_indicators_and_overlays/moving_averages/cs-movavg.xls
    In our model the fact table have these columns:
    Symbol Date Open High Low Close Volume
    And in the Calendar table we´ve identified the trading days (Calendar[TradingDayNumber]) as 1 so we can count them back.
    We want the EMA calculated field in a pivot table like this
    Filter context: a date selected on Calendar[FullDate]
    Row context: FactTable[Symbol]
    Values: FactTable[Close]
        FactTable[EMA 20D] >> Missing
    So far we got these calculated fields:
    Period
    =20
    Ema Multiplier
    =2 / ([Period] + 1)
    Average 20D CLOSE
    =IF([Sum of CLOSE]=BLANK(),BLANK(),(CALCULATE(AVERAGE(FactTable[CLOSE]),FILTER(ALL(Calendar),Calendar[TradingDayNumber]<=MAX(Calendar[TradingDayNumber]) && Calendar[TradingDayNumber]>MAX(Calendar[TradingDayNumber])-[Period]))))
    But it looks like the EMA formula contains a self reference from previous values, and it also starts from a SMA (Average 20D CLOSE) value.
    How can we do it?
    Thanks in advance. I highly appreciate your support.

    Nico,
    Is this still an issue?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Moving Average Price for Sales stock and Project stock of a material

    Hiya Gurus,
                     I am developing a report to display inventory details. My requirement is that I have to display the Moving average price of a material for all Valuation type. I also need to display the Moving average price if a material has got Project stock or Sales stock.
                     In MBEW table I can get the Valuation type and its Moving average price, but how can I find the moving average price for the same material if it has got Sales stock and project stock. Please let me know the table and field where I could get the relevant data.
                    Kindly help me on this, it would be deeply appreciated.
    Cheers,
    ZIa

    Hi
    can you look at tables
    EBEW                             Sales Order Stock Valuation
    QBEW                             Project Stock Valuation
    Nat

  • SSRS 2008 R2 - Add moving average to column group

    I have a column group of dollar amounts.  The row is a year/month.  I would like to add a moving average column to the right of the last 6 months.  My SQL Server data source is already complex enough and I'd really prefer not to add a column
    there.  Is there anything I can do within the report itself?  Some way to reference the previous records in a matrix?
    Thank you!

    Hi mateoc15,
    According to your description, you have a matrix in your report. Now you want to calculate the average value of last 6 month. Right?
    In Reporting Service, we can put custom code into report to deal with complicated logic. Add one more column/row inside of group and call the functions defined in custom code. For your requirement we modified Robert’s code to achieve your goal. We tested
    your case in our local environment with sample data. Here are steps and screenshots for your reference:
    Put the custom code into report:
    Private queueLength As Integer = 6
    Private queueSum As Double = 0
    Private queueFull As Boolean = False
    Private idChange As String=""
    Dim queue As New System.Collections.Generic.Queue(Of Integer)
    Public Function CumulativeQueue(ByVal currentValue As Integer,id As String) As Object
    Dim removedValue As Double = 0
    If idChange <> id then
            ClearQueue()
                    idChange = id
                    queueSum = 0
                    queueFull = False
                    CumulativeQueue(currentValue,id)
    Else
                    If queue.Count >= queueLength Then
                                    removedValue = queue.Dequeue()
                    End If
                    queueSum += currentValue
                    queueSum -= removedValue
                    queue.Enqueue(currentValue)
                    If queue.Count < queueLength Then
                    Return Nothing
                    ElseIf queue.Count = queueLength And queueFull = False Then
                    queueFull = True
                    Return queueSum / queueLength
                    Else
                    Return (queueSum) / queueLength
                    End If
    End If
    End Function
    public function ClearQueue()
    Dim i as Integer
    Dim n as Integer = Queue.Count-1
    for i=n To 0 Step-1
                    queue.Dequeue()
    next i
    End function
    Add one more row inside of group, call the function defined in custom code.
    Save and preview. It looks like below:
    Reference:
    Moving or rolling average, how to?
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou (Pactera)

  • Moving average price

    Hai all MM gurus,
    While invoice posting, system is showing the error message " Moving average price is negative for the material ".
    How to post the invoice .

    Hi,
    In the material master the moving average price is negative.
    Please use MR21 and change price so that the MAP will be
    postitive then you can verify  the invoice
    G.Ganesh Kumar

  • Moving average Price for Material is Negative

    HI Friends,
    I am doing MIRO for PO where its giving me error while posting the Invoice that
    Moving average price for material is negative
    Can any please help me to resolve this.
    what would be the implications if the price difference is too high b/w MAP in Invoice .
    Thnaks
    Purna Nalluri

    It is ofcourse bcoz there is price difference in the between PO and IR....
    so as per the calculations the MAP becomes negative....
    The formula for it is :
    Difference/Current stock holding + current moving average...
    Pls check you price entered at PO and IR....
    There are no any implecations...excepts the price differece is reflected in the MAP of MMR....
    hope it helps...
    Regards
    Priyanka.P
    Edited by: Priyanka Paltanwale on Sep 23, 2008 7:28 AM

  • Error: moving average price negative while doing MIRO

    Hi Experts,
    I am doing MIRo for PO where its giving me error while posting the Invoice that:
    Moving average price for material is negative: XSEPSNPW045CX 1044
    The MAP maintained in material master is 39,979.71 and in the invoice and GRN is 69,049.58. 
    Can any please help me to resolve this.
    what would be the implications if the price difference is too high b/w MAP in Invoice amount.
    and
    what happen when we paintain the amount in mr21.
    Regards,
    Sonali.

    Hi,
    Pls check your price in MMR (MAP price) and then check the IR price of material ....
    Example:
    MMR MAP Price = 5.00 EUR
    If IR price = 30 .00 Eur
    IN YOUR CASE:
    The MAP maintained in material master is 39,979.71
    and in the invoice and GRN is 69,049.58.
    So MAP PRice defined in the MMR is lesser than the IR price...
    so the MAP will get negative...
    Hope it helps...
    Regards
    Priyanka.P
    AWARD IF HELPFULL
    Edited by: Priyanka Paltanwale on Sep 2, 2008 7:49 AM

  • Using Moving Average Materials with MF42N (Repetitive Production)

    Version: ECC 6.0
    I have a "Is this possible" question.  I know this isn't a best business practice, but thought I'd anyway.  Here goes ...
    A material that uses Moving Average (referenced as Material123 below) has the following two materials in its BOM:  (1) Moving Average (Material456), and (2) Non-valuated material, material type = LEER (Material789).
    The 1st material in the BOM (Material456) is Liquid Oxygen.  This product is purchased from a vendor and received into inventory via movement type 101.
    The 2nd material in the BOM is an empty cylinder (Material789)
    The parent material (Material123) being produced is gaseous Oxygen (Oxygen in gas form).
    Basic production process:  Liquid Oxygen is the raw material, it is pressurized and stored in a cylinder in gaseous form (for clarity, you've probably seen cylinders before, the two obvious examples of cylinders are propane cylinders used on barbeques and helium cylinders used to blow-up balloons).
    Assumptions:  (1) We do not want to do a cost roll, (2) We want to report production (TCode=MF42N) to consume the Bulk Oxygen (Material456) and the cylinder (Material789), and create the finished good (Material123), and (3) We do not want to burden the cost of the parent material (Material123) with direct costs, we only want the material costs.
    If you read through the assumptions you can see that this is not proper accounting for a production process (i.e. the direct costs in the production process are not capitalized -- labor, power, etc.), if you can get beyond that I was wondering if anyone has ever set anything like this up?  I tried to set this up and report production in my test environment, I got the materials created, the BOM created, but when I tried to report production it gave me an error, it needs a production version and/or a cost collector.
    If anyone has done anything like this I'd be interested in knowing if it is possible to report production with a setup like this.  Thanks.

    Using CO production orders may solve your problem. They dont need PP or product costing to be implemented. Costs can be flexibly posted and there are not many demanding requirements for this.
    Tcode:KKF1
    Link: [http://help.sap.com/saphelp_erp2004/helpdata/EN/82/e72326b11411d29f60080009b0db33/frameset.htm]
    Thanks
    Naveen

  • Updation of Moving Average Price

    Dear Experts,
    My MM period is open for 2 months (i.e for July and August Now) . One of our raw material is Limestone.
    From July 1st there were several Receipts and Issues of limestone in SAP.
    In August 9th our survey team found that in our stock we have 25000 TON limestone excess. (Due to Callibiration error)
    i.e If the current stock in system was 10000  TON the real Physical stock in storage was 10000 + 25000 TON.
    We have created a Free of Cost PO for 25000 TON to account the excess quantity of Limestone in Stock.
    MIGO Goods Receipt for the Free of Cost PO was done on 31.07.2011.
    Because of the extra 25000 TON Free of Cost Limestone Receipt the Moving Average Price of the Material got Updated. (But only from 09-August-2011 not from 31-July-2011)
    I want system to calculate the new moving average price and update all the documents posted from 31-July-2011. MY MM period is not closed.
    Is it possible to do so and how. Please Help.
    Thanks

    Hi
    The physical inventory is carried out on the basis of stock management units.A stock management unit is a non-divisible part of a stock of materials for which a seperate book inventory exists.A stock management unit is uniquely defined by
    Material
    Plant,storage location
    Stock type
    Batch
    Special Stock
    Each stock management unit of a material is counted seperately,and the inventory diffreneces are posted per stock management unit.
    The physical inventory process comprises three phases
    1)Creation of physical inventory documents(MI01)
    2)Entry of Count(MI04)
    3)Posting the difference(MI07)
    1)In the first phase ,you create the physical inventory documents.SAP systems provide several procedures for mass-generation of PI documents.After selecting the stocks to be counted and creating the PI documents,you print out the documents in order to start the counting process.A physical inventory document cotains data that include
    >The plant and storage location in which the count has to take place
    >The date on which the count has to take place
    >The materials to be counted
    >the stock types to be counted
    >The status of the item
    >The status of the PI document
    When creating a PI document,you can specify a physical inventory nuber in the document header.This physical inventory number facilitates selection of the PI documents to be processed during entry of the count data,posting the diffrences, and in evaluations.
    2)Entering the physical inventory count:For the physical inventory count,you must print out the PI document and forward it to persons responsible for the count.You can enter the stock figures in the system with and without reference to a PI document.When entering the physical inventory count,you can enter a percentage variance of the count quantity from the book inventory,above which the system issues a warning message.
    3)You can post the inventory diffrences either via list of differences or via seperate transactions.When an inventory difference is posted,the system creates a material document and corrects the stock figures,and an accounting document recording the necessary accounting movements.
    Hope this will be helpful for you.
    Regards,
    Sandesh Sawant

  • Moving Average Price tolerances for intercompany transfers

    We are looking to utilize the tolerance limit settings for GR's to prevent entry mistakes from affecting moving average prices severly.  I have sucessfully tested this process by triggering a warning/error message at the time of a goods receipt, but have been unable to trigger a warning/error for intercompany transfers.
    Is this configuration in the OMC0 settings, in config, or somewhere else?
    Thanks very much for any feedback.
    Matt

    HI Jurgen,
    Thanks for your reply.
    1. We have maintained the price control as V
    2. You have mentioned "However it is as well possible to enter an external value in the movement (if enabled in customizing). then the movement is valuated with this value and the MAP in material master is adjusted."
    Where to checl in IMG for the above ?
    3. We did goods issue in the previous period 12/2011 but doing the GR in current period 01/2012. Do we need to maintain MAP for both the periods ?
    If you can please tell us what is the standard process to carry out such activity ?
    Regards
    Sayan

  • Moving average price not updatet when sales order stock

    Sales order stock is ioncluded in calculating moving average (at goods receipt there is no new valuation type created)
    It is okay with replenishment orders (regular stock)
    I first thought it had to do with Spec. Stk Valuation indictator (but this one is set to 'M', which seems right for me.
    Does anyone have a clue what I can do so my moving average value is also calculated based on sales order stock and not only regular stock?
    Kind Regards
    Kevin
    Edited by: Kevin Gielen on May 5, 2010 2:44 PM

    Spl Stock Valution must be - A (not M) to valuate along with normal stock .
    Ensure following configuration is there
    1. create Requirement class in OVZG . Maintain required account assignment category under account assginment subscreen
    2. Create requirement type in OVZH . assign this req.class to req.type
    3.Assign requirement type to sales item categories for which you need this VSO functionality
    4.Goto SM30 and give table V_T459K_K ,mainatain ,for your requirement class under valuation field maintain M or A(put F1 for moreinfo)
    5.Take SD consultant help to setup schedule line category(SC) for this item category ,it should have account assignemtnt category and PR order type - VOV6 and assign this SC to item category in VOV5
    6. Now create SO which will populate the above created item category (if not check with SD consul to populate the above item category)
    7.convert the PR generated through above SO into PO
    8.In PO under account assignment tab you could see BSX account and it must be greyout .
    9.Do GR ,stock will be updated in MBBS report.
    it resolves your requirements
    check point in each transaction:
    after SO ,check VBAP- KZBWS = M or A (which you have maintained in requirement class)
    PR from SO, EBAN-KZBWS =M or A and PO also will have EKPO-KZBWS = M or A

  • Moving Average Price for Non-Valuated Material

    Hello Experts
    The question may seem to be quirky but need your advice for the below.
    My client is buying non-valuated material against a cost center, they do not want to keep the stocks valuated. No value update only quantity update. The accounting documents are the following when the GR is done by receiving folks
    Qty of material XYZ goods receipted = 10
    Debit     Consumption GL   12345678       10 USD          Cost Center ABC123 (This is a warehouse cost center)
    Credit    GR/IR account                            10 USD
    Qty of mateiral XYZ issued = 5
    The goods are later on issued to Production cost center and the client was the below entries to be passed with MOVING AVERAGE PRICE.
    Debit    Consumption GL 12345678           6 USD          Cost Center ABC456 (This is production Cost center)
    Credit   Consumption GL 12345678           6 USD          Cost Center ABC123 (This is warehouse cost center)
    I am aware that as this is a non valuated material the above entry is not possible. Maybe, I will use BAPI_ACC_DOCUMENT_POST for the generating the accounting document when the goods are issued from warehosue to production center.
    My question is how can i get the moving average price.
    Regards
    Chokkalingam Pillai

    you can have an accounting view for non-valuated materials, this helps for example with purchase requisitions as they could take the valuation price from the material master and the user does not need to enter a valuation manually.
    But the material master moving average  price cannot be calculated and updated automatically, as it is not foreseen in any standard program to do this for cost center procurement, since SAP only calculates a MAP for valuated stocks.
    Further it is not logical to issue non-valuated stock valuated (even with a different price) from cost center to cost center.
    It looks like you want to  have a kind of internal billing for warehouse services, as you end up with a negative amount in the warehouse cost center which is then the profit.
    Why don't you just  create a report to run at the end of the month, listing all goods issue movements with their cost centers and taking the price from last PO (or from material master if you decide to maintain it manually) and use this for a manual cost center posting in CO module

Maybe you are looking for