Re: [Scilab-users] Efficiency map

2020-04-14 Thread Stéphane Mottelet

Hello,

You are taking the problem by the wrong tip. If I understand your 
problem, you have scattered (x,y,z) data (x=speed, y=torque, 
z=efficiency) and you want to approximate this data by a smooth surface 
z=f(x,y) and want to draw level curves of this surface.


So, instead of focusing on curves first, you have to focus on the global 
approximation of the surface,and the level curves will be easy to 
determinate afterwards.


So please provide your data (you can send it to me in a private message) 
if you want us to test different approaches.


S.

Le 14/04/2020 à 23:08, Daniel Stringari a écrit :

The curve I would like to plot is similar to the one attached. There are
several efficiency curves within a SPEEDxTORQUE chart. My problem comes down
to a spreadsheet generated by external software where I have three columns:
SPEED, TORQUE and EFFICIENCY. The data is all broken and so I have to put an
efficiency range to get data of just one efficiency. In this case, I created
a function that runs through this matrix to collect the SPEEDxTORQUE data
for efficiency (interval) and that is why I have several points nearby that
could be reduced to just one. These vectors that I sent initially correspond
to only one of these curves, if I'm not mistaken it's the 94% efficiency
curve. I was observing the function of contour curves and I thought it would
be possible to apply, since I will have to paint the graphic in the future.
But I don't know how to do that yet. It is worth mentioning that the points
vary according to the efficiency range, that is, it is not possible to
predict how many SPEEDxTORQUE points I will have.





--
Sent from: 
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users


--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Efficiency map

2020-04-14 Thread Daniel Stringari
The curve I have so far is summarized in the attachment below.

 



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Efficiency map

2020-04-14 Thread Daniel Stringari
The curve I would like to plot is similar to the one attached. There are
several efficiency curves within a SPEEDxTORQUE chart. My problem comes down
to a spreadsheet generated by external software where I have three columns:
SPEED, TORQUE and EFFICIENCY. The data is all broken and so I have to put an
efficiency range to get data of just one efficiency. In this case, I created
a function that runs through this matrix to collect the SPEEDxTORQUE data
for efficiency (interval) and that is why I have several points nearby that
could be reduced to just one. These vectors that I sent initially correspond
to only one of these curves, if I'm not mistaken it's the 94% efficiency
curve. I was observing the function of contour curves and I thought it would
be possible to apply, since I will have to paint the graphic in the future.
But I don't know how to do that yet. It is worth mentioning that the points
vary according to the efficiency range, that is, it is not possible to
predict how many SPEEDxTORQUE points I will have.

 



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] spline and color plot on the chart

2020-04-14 Thread Federico Miyara


Daniel,

Looking at the graph from your script there are two striking things. 
First, your data seems to be heavily clustered at certain regions, I 
mean, several points very close to each other, then a gap without data 
(which is conveniently interpolated by the plot clause), then another 
cluster and so on. From a statistical point of view, each cluster
counts as a single point. You don't have information of what happens 
between neighboring clusters.


The second striking thing is that you don't seem to be using the spline 
concept correctly. You are using it to approximate the same points you 
already have. To make things worse, you are using lsq_splin (a cannon to 
kill a fly), which is normally used to get a simpler spline by using 
less breakpoints than the total number of available points. This will 
normally give a smooth approximation of data, so that the spline will 
not necessarily pass through any of your points. It is used when the 
data set is inconsistent due to noise or measurement errors to avoid 
over representing irrelevant features. If you use it with the same 
number of breakpoints as the available data, I guess you will have a 
spline that pass through all the points (this will be the least-square 
solution since the error will be zero), so it is the same as an ordinary 
spline interpolation.


The correct way to use a spline is to use it to interpolate your data, 
i.e., to have much more points than the original ones, or to have them 
more evenly distributed. You are representing your very same data using 
a spline, so there is no smoothing. The plot function does some 
interpolation job, but linearly: it connects points with straight segments.


You need to calculate more points and more evenly distributed with your 
spline, but probably you'll be disappointed because the behavior in the 
large gaps between data clusters may be strangewith some odd oscillations..


If you can, try to generate your data more evenly.

Regards,

Federico Miyara


On 11/04/2020 21:45, Daniel Stringari wrote:

Federico,

I am extracting the values of the vectors (vv12 and vt12) from a logic 
in which it takes data from a spreadsheet that was generated using 
specific software. The vectors (vv12 and vt12) represent an efficiency 
curve within the torque x speed plane, I have eleven more of these 
vectors that vary in size. I believe that I do not have a role in 
which one depends on the other directly. I tried to follow your first 
reasoning and arrived at a routine that does not report errors but is 
not smoothing my curve either, follow the routine:


clc
clear
vt12  =  
[5350.3,5380.19,5410.08,5439.96,4149.5,4179.35,3756.57,3602.73,3568.12,3597.85,3681.91,3711.59,6143.24,6172.86,6202.49,6232.1]
vv12  =  
[40.16,39.93,39.71,39.49,69.04,68.54,95.32,119.26,140.49,139.32,155.62,154.37,93.27,92.82,92.38,91.94]

c  =  size  (vt12)
a  =  1
b  =  c(2)
n  =  c(2)
x  =  linspace  (a,  b,  n)

[yvt,dvt]  =  lsq_splin(x,vt12,linspace  (a,b,n))
[yvv,dvv]  =  lsq_splin(x,vv12,linspace  (a,b,n))

ys=interp(linspace  (a,b,n),linspace  (a,b,n),yvt,dvt)
xs=interp(linspace  (a,b,n),linspace  (a,b,n),yvv,dvv)

plot  (ys,xs,'r')
xlabel  ('Speed (rpm)')
ylabel  ('Torque (Nm)')
title  ('Torque x speed values')
Any idea how I can proceed with my goal of smoothing the curve to use the color 
map later?

On Sat, Apr 11, 2020 at 9:18 PM Federico Miyara 
mailto:fmiy...@fceia.unr.edu.ar>> wrote:



Daniel,

I'm afraid I was a bit confused with your application case.

I assumed that there was an independent variable such as time or
other which the other two, vt12 and vv12, depend on. If this were
the case, the expected graph could be a curve or rather a
trajectory with some hysteresis.

But if your data are just measurements in no particular order of
what is a functional relation of one variable respect to the
other, for instance vt12 = f(vv12), then the approach is
different. You should basically sort the independent variable in
increasing order using gsort and apply the same sorting to the
dependent variable:

[x, I] = gsort(vv12,"g","i");
y = vt12(I);

Then you can proceed to interpolate with spline or lsg_splin.

Regards,

Federico Miyara


On 10/04/2020 21:05, Daniel Stringari wrote:

Federico,

I appreciate the help. Below is a list of the code on which I try
to plot the data with Isq_splin:

c = size (vt12)
a = 0
b = c (1) // c (1) = 16
n = c (1)
x = linspace (a, b, n)
[y, d] = lsq_splin (vt12, vv12, x ')
plot (y, d, 'r')
xlabel ('Speed (rpm)')
ylabel ('Torque (Nm)')
title ('Torque x speed values')

//vt12 = 5350.3 5380.19 5410.08 5439.96 4149.5 4179.35 3756.57
3602.73 3568.12 3597.85 3681.91 3711.59 6143.24 6172.86 6202.49
6232.1
//vv12 = 40.16   39.93   39.71   39.49   69.04   68.54 95.32  
119.26   140.49   139.32   155.62   154.37 93.27   92.82   92.38
  91.94

but 

Re: [Scilab-users] Compiling Scilab for macOS

2020-04-14 Thread Arvid Rosén
Sorry for top-posting, but here are a few of the errors I get:

Something missing with:
import javax.activation.MimetypesFileTypeMap;

A bunch of these:
compile:
[javac] Compiling 1 source file to 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/build/classes
[javac] 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java
[javac] warning: Supported source version 'RELEASE_6' from annotation 
processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than 
-source '8'
[javac] 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/CSSParser.java:17:
 error: package javax.annotation does not exist
[javac] @javax.annotation.Generated("JFlex")
[javac]  ^
[javac] 1 error
[javac] 1 warning

And also this one:
compile:
[javac] Compiling 5 source files to 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/build/classes/v2
[javac] 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_Scilab.java
[javac] 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Call_ScilabJNI.java
[javac] 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/JavasciException.java
[javac] 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java
[javac] 
/Users/arvid/everything/scilab/src/scilab/scilab-6.1.1/scilab/modules/javasci/src/java/org/scilab/modules/javasci/ScilabVariablesJavasci.java
[javac] warning: [options] bootstrap class path not set in conjunction with 
-source 6
[javac] error: Source option 6 is no longer supported. Use 7 or later.
[javac] error: Target option 6 is no longer supported. Use 7 or later.

Cheers,
Arvid

From: Scilab Users List  on behalf of Stéphane 
Mottelet 
Reply to: Users mailing list for Scilab 
Date: Tuesday, 14 April 2020 at 17:00
To: "users@lists.scilab.org" 
Subject: Re: [Scilab-users] Compiling Scilab for macOS


Hello,
Le 14/04/2020 à 16:51, Arvid Rosén a écrit :
Hi,

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: 
https://www.scilab.org) , so I’m trying to compile one myself.
Great, at least we will be two now...

However, I get a bunch of Java errors during compilation.
Which kind ?

I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,

Yes.

S.
or should I try using some other version or provider for compiling Scilab on 
macOS Catalina?

Cheers,
Arvid



___

users mailing list

users@lists.scilab.org

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

--

Stéphane Mottelet

Ingénieur de recherche

EA 4297 Transformations Intégrées de la Matière Renouvelable

Département Génie des Procédés Industriels

Sorbonne Universités - Université de Technologie de Compiègne

CS 60319, 60203 Compiègne cedex

Tel : +33(0)344234688

http://www.utc.fr/~mottelet
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Compiling Scilab for macOS

2020-04-14 Thread Stéphane Mottelet

Hello,

Le 14/04/2020 à 16:51, Arvid Rosén a écrit :


Hi,

I still can’t find any Scilab 6.1 builds for macOS (despite the info 
text here: https://www.scilab.org) , so I’m trying to compile one myself.



Great, at least we will be two now...


However, I get a bunch of Java errors during compilation.


Which kind ?


I’m currently using a JDK from AdoptOpenJDK (Java 8). Is this correct,


Yes.

S.

or should I try using some other version or provider for compiling 
Scilab on macOS Catalina?


Cheers,

Arvid


___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users


--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Compiling Scilab for macOS

2020-04-14 Thread Arvid Rosén
Hi,

I still can’t find any Scilab 6.1 builds for macOS (despite the info text here: 
https://www.scilab.org) , so I’m trying to compile one myself. However, I get a 
bunch of Java errors during compilation. I’m currently using a JDK from 
AdoptOpenJDK (Java 8). Is this correct, or should I try using some other 
version or provider for compiling Scilab on macOS Catalina?

Cheers,
Arvid
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Efficiency map

2020-04-14 Thread Stéphane Mottelet

Moreover, knowing if you are looking for closed curves (or not) would help.

S.

Le 12/04/2020 à 17:00, Stéphane Mottelet a écrit :


Hello Daniel,

There can be different answers depending on what you are trying to 
obtain at the end.


Do you need to smooth curves by themselves, or are you somewhat trying 
to build  a smooth surface based on iso-value curves (your TORQUE X 
SPEED curve ?) ?


In this latter case, can you provide the efficiency value associated 
to each TORQUE X SPEED curve ?


In the former case, you need some ordering of your data, e.g. by angle 
computed with center located at the mass center of points, then least 
squares splines could be applied more efficiently.


S.

Le 07/04/2020 à 00:13, Daniel Stringari a écrit :
Dear friends, I'm still a layman at SCILAB, but I'm using SCILAB this 
week to be able to plot an efficiency map through a routine I created 
on it. Basically the efficiency map is summarized in* annex 1_0 and  
annex 1_1*(I took it from the internet to exemplify the problem), 
where through a TORQUE X SPEED curve I have efficiency lines.
In *annex 2*, I have an example of how my curve looks so far. Based 
on the example, I have two problems:
1) I tried to use the SPLIN function to interpolate the points, but 
it doesn't work considering that it works only with strictly 
increasing vectors. Any suggestions for me to smooth the curve?
2) When trying to add colors, I realized that most plotting functions 
do not work with values that are not real, which is my case ... All 
values with decimal places. Any suggestions for solving this other 
problem?


Friends, I appreciate any form of help...

attachments: 
https://drive.google.com/open?id=1DZORDJfpoezDhzYYyn4oold1O1V1Yz0Z 



___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users


--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users