Global Least-Squares Objective
The Global Least-Squares Objective is similar to the Least-Squares Objective (see Least-Squares Objective) but compares measured data to a globally available model expression. Therefore it does not require any selection, and does not allow any Coordinate Column subnodes.
In addition, the Experimental Data section contains a Data source choice:
Select File (the default) to take the experimental data directly from a file. Click Browse to locate and select the file. Add column nodes below the Least-Squares Objective to specify the contents of each column in the file. See Least-Squares Objective, Value Column, Time Column, Parameter Column, and Ignored Column for details.
Select Result table to use experimental data from a Table node under Results. The data may have been generated by another feature under Results, or imported into the table feature. In either case, the experimental data will be stored in the COMSOL model file.
Select Local table to enter experimental data directly into a local table in this Settings window. Click the Add button () below the table to add another column. Rows are added automatically as you fill in the first column. To remove a column of data, select some cell in that column and click the Delete Column button (). Similarly, click the Delete button () to delete the current row. You can also save the definitions of the experimental data to a text file by clicking the Save to file button (). To load a text file with experimental data, use the Load from file button (). The file dialog box allows a number of different file types, both for import and export.
When using experimental data in a Local table or from a Results table, you must choose from the Parameter type list whether each data row in the table corresponds to a Time or a Parameter value, and in which Time column or Parameter column the corresponding value is stored. Also specify the Time unit, or the Parameter name and Parameter unit, as appropriate. Finally, fill in the Model expression corresponding to the experimental values in each Data column, as well as the column Unit and Weight.
When the data source is Results table or Local table, you can also select which items in the Data column by clearing or selecting the corresponding check box in the Use column. You can then, for example, use the same results table to contain both experimental input and output data when performing a time-dependent optimization using a time-dependent load.
To add this feature, either right-click the Optimization interface node and select it from the context menu, or in the Physics toolbar, click Global Least-Squares Objective (). In some cases, select it from the Global submenu.
See Mooney–Rivlin Curve Fit for an example of fitting unknown function parameters to measured data using a global least-squares objective: Application Library path Optimization_Module/Parameter_Estimation/curve_fit_mooney_rivlin.